home *** CD-ROM | disk | FTP | other *** search
/ Amiga CD-Sensation: Golden Games / Amiga CD-Sensation - Ausgabe 2 - Golden Games (1996)(GTI - Schatztruhe)(DE)[!].iso / Specials / Inform / examples / advent.inf next >
Text File  |  1995-08-01  |  135KB  |  3,694 lines

  1. ! ----------------------------------------------------------------------------
  2. !  Advent: a demonstration of Inform 5 code, and a classic game.
  3. !
  4. !  Begun 17.5.94: completed 24.5.94
  5. ! ----------------------------------------------------------------------------
  6.  
  7. Switches xdv5s;
  8.  
  9. ! Constant TEST_VERSION;
  10. ! Constant NOMENU_VERSION;
  11.  
  12. Constant Story "ADVENTURE";
  13. Constant Headline
  14.            "^The Interactive Original^\
  15.              By Willie Crowther and Don Woods (1977)^\
  16.              David M. Baggett's 1993 reconstruction, ported by Graham Nelson^";
  17.  
  18. Release 2;
  19.  
  20. Attribute valuable;
  21. Attribute nodwarf;
  22. Attribute treasure_found;
  23. Property depositpoints;
  24.  
  25. Constant MAX_CARRIED 7;
  26. Constant MAX_SCORE 350;
  27. Constant MAX_TREASURES 15;
  28. Constant AMUSING_PROVIDED;
  29.  
  30. Include "Parser";
  31. Include "VerbLib";
  32.  
  33. Global caves_closed = 0;
  34. Global canyon_from;
  35. Global treasures_found = 0;
  36. Global deaths = 0;
  37.  
  38. Class Treasure
  39.  with depositpoints 10,
  40.       after
  41.       [; Take: if (location==Inside_Building)
  42.                     score=score-self.depositpoints;
  43.                score=score+5;
  44.                if (noun hasnt treasure_found)
  45.                {   give noun treasure_found; treasures_found++;
  46.                    score=score+2;
  47.                }
  48.                "Taken!";
  49.          Drop: score=score-5;
  50.                if (location==Inside_Building)
  51.                {   score=score+self.depositpoints;
  52.                    "Safely deposited.";
  53.                }               
  54.       ],
  55.  has  valuable;
  56.  
  57. ! ----------------------------------------------------------------------------
  58. !   The outside world
  59. ! ----------------------------------------------------------------------------
  60.  
  61. Object At_End_Of_Road "At End Of Road"
  62.   with description "You are standing at the end of a road before a small \
  63.                     brick building.  Around you is a forest.  A small \
  64.                     stream flows out of the building and down a gully.",
  65.        w_to At_Hill_In_Road, u_to At_Hill_In_Road, e_to Inside_Building,
  66.        d_to In_A_Valley, s_to In_A_Valley, n_to In_Forest_1,
  67.        in_to Inside_Building,
  68.        name "gully" "road" "street" "path"
  69.   has  light;
  70.  
  71. Object well "well house"
  72.   with name "well" "house" "brick" "building" "small" "wellhouse",
  73.        description "It's a small brick building. It seems to be a well house.",
  74.        found_in  At_End_Of_Road  At_Hill_In_Road  Inside_Building
  75.   has  scenery;
  76.  
  77. Object Stream "stream"
  78.   with name "stream" "water" "brook" "river" "lake"
  79.             "small" "tumbling" "splashing" "babbling" "rushing" "reservoir",
  80.        found_in At_End_Of_Road  In_A_Valley  At_Slit_In_Streambed
  81.                 In_Pit  In_Cavern_With_Waterfall
  82.                 At_Reservoir
  83.                 Inside_Building,
  84.        before
  85.        [; Drink: 
  86.                  "You have taken a drink from the stream.  The water \
  87.                   tastes strongly of minerals, but is not unpleasant.  \
  88.                   It is extremely cold.";
  89.           Take: if (bottle notin player)
  90.                     "You have nothing in which to carry the water.";
  91.                 <<Fill bottle>>;
  92.           Insert: if (second == bottle) <<Fill bottle>>;
  93.                     "You have nothing in which to carry the water.";
  94.           Receive: if (noun == ming_vase)
  95.                 {   remove ming_vase; move shards to location;
  96.                     score=score-5;
  97.                     "The sudden change in temperature \
  98.                      has delicately shattered the vase.";
  99.                 }
  100.                 if (noun == bottle) <<Fill bottle>>;
  101.                 remove noun; if (noun has valuable) score=score-5;
  102.                 CDefArt(noun); " washes away with the stream.";
  103.        ],
  104.   has  scenery;
  105.  
  106. Object Road "road"
  107.   with name "road" "street" "path" "dirt",
  108.        description "The road is dirt, not yellow brick.",
  109.        found_in  At_End_Of_Road  At_Hill_In_Road  In_Forest_2
  110.   has  scenery;
  111.  
  112. Object forest "forest"
  113.   with name     "forest" "tree" "trees" "oak" "maple" "grove" "pine"
  114.                 "spruce" "birch" "ash" "saplings" "bushes" "leaves"
  115.                 "berry" "berries" "hardwood",
  116.        description
  117.                 "The trees of the forest are large hardwood oak and \
  118.                 maple, with an occasional grove of pine or spruce.  \
  119.                 There is quite a bit of undergrowth, largely birch \
  120.                 and ash saplings plus nondescript bushes of various \
  121.                 sorts.  This time of year visibility is quite \
  122.                 restricted by all the leaves, but travel is quite \
  123.                 easy if you detour around the spruce and berry \
  124.                 bushes.",
  125.        found_in At_End_Of_Road  At_Hill_In_Road  In_A_Valley
  126.                 In_Forest_1  In_Forest_2
  127.   has  scenery;
  128.  
  129.  
  130. Object At_Hill_In_Road "At Hill In Road"
  131.   with description "You have walked up a hill, still in the forest.  The road \
  132.                slopes back down the other side of the hill.  There is a \
  133.                building in the distance.",
  134.        e_to At_End_Of_Road,
  135.        n_to At_End_Of_Road,
  136.        d_to At_End_Of_Road,
  137.        s_to In_Forest_1,
  138.        name "gully" "road" "street" "path"
  139.   has  light;
  140.  
  141. Nearby Hill "hill"
  142.   with description "It's just a typical hill.",
  143.        name "hill" "bump" "incline"
  144.   has  scenery;
  145.  
  146. Nearby OtherSideOfHill "other side of hill"
  147.   with article "the", description "Why not explore it yourself?",
  148.        name "side" "other"
  149.   has  scenery;
  150.  
  151.  
  152. Object Inside_Building "Inside Building"
  153.   with description "You are inside a building, a well house for a \
  154.                 large spring.",
  155.        cant_go "The stream flows out through a pair of 1 foot \
  156.                diameter sewer pipes.  The only exit is to the west.",
  157.        before
  158.        [; Enter: if (noun==Spring or SewerPipes)
  159.              "The stream flows out through a pair of 1 foot \
  160.               diameter sewer pipes.  It would be advisable to use the exit.";
  161.           Xyzzy: if (In_Debris_Room hasnt visited) rfalse;
  162.                  PlayerTo(In_Debris_Room); rtrue;
  163.           Plugh: if (At_Y2 hasnt visited) rfalse;
  164.                  PlayerTo(At_Y2); rtrue;
  165.        ],
  166.        w_to At_End_Of_Road, out_to At_End_Of_Road,
  167.        in_to "The pipes are too small."
  168.   has  light;
  169.  
  170. Nearby Spring "spring"
  171.   with name "spring" "large",
  172.        description "The stream flows out through a pair of 1 foot \
  173.                 diameter sewer pipes."
  174.   has  scenery;
  175.  
  176. Nearby SewerPipes "pair of 1 foot diameter sewer pipes"
  177.   with name "pipes" "pipe" "one" "foot" "diameter" "sewer" "sewer-pipes",
  178.        description "Too small.  The only exit is to the west."
  179.   has  scenery;
  180.  
  181. Nearby set_of_keys "set of keys"
  182.   with description "It's just a normal-looking set of keys.",
  183.        initial "There are some keys on the ground here.",
  184.        name "keys" "key" "keyring" "set" "of" "bunch";
  185.  
  186.  
  187. Nearby tasty_food "tasty food"
  188.   with description "Sure looks yummy!", article "some",
  189.        initial "There is tasty food here.",
  190.        name "food" "ration" "rations" "tripe"
  191.             "yummy" "tasty" "delicious" "scrumptious",
  192.        after
  193.        [; Eat: "Delicious!"; ],
  194.   has  edible;
  195.  
  196.  
  197. Nearby brass_lantern "brass lantern"
  198.   with name "lamp" "headlamp" "headlight" "lantern" "light" "shiny" "brass",
  199.        when_off "There is a shiny brass lamp nearby.",
  200.        when_on  "Your lamp is here, gleaming brightly.",
  201.        number 330,
  202.        time_left 0,
  203.        daemon
  204.        [ t; if (self hasnt on) { StopDaemon(self); rtrue; }
  205.          t=self.number-1;
  206.          self.number=t;
  207.          if (t==0) give self ~on ~light;
  208.  
  209.          if (self in player || self in location)
  210.          {   if (t==0)
  211.              {   
  212.                  print "Your lamp has run out of power.";
  213.                  if (fresh_batteries notin player && location hasnt light)
  214.                  {   deadflag=3;
  215.                      "  You can't explore the cave without a lamp. So \
  216.                       let's just call it a day.";
  217.                  }
  218.                  else ReplaceBatts();
  219.                  new_line; rtrue;
  220.              }  
  221.              if (t==30)
  222.              {   print "Your lamp is getting dim.";
  223.                  if (fresh_batteries has general)
  224.                      "  You're also out of spare batteries.  \
  225.                       You'd best start wrapping this up.";
  226.                  if (fresh_batteries in VendingMachine
  227.                      && Dead_End_14 has visited)
  228.                      "  You'd best start wrapping this up, \
  229.                       unless you can find some fresh \
  230.                       batteries. I seem to recall there's a \
  231.                       vending machine in the maze.  Bring \
  232.                       some coins with you.";
  233.                  if (fresh_batteries notin VendingMachine)
  234.                       "  You'd best go back for those batteries.";
  235.                  new_line; rtrue;
  236.              }
  237.          }
  238.        ],
  239.        before
  240.        [; Examine: print "It is a shiny brass lamp";
  241.                 if (self hasnt on)
  242.                     ".  It is not currently lit.";
  243.                 if (self.number < 30)
  244.                     ", glowing dimly.";
  245.                 ", glowing brightly.";
  246.           Burn: <<SwitchOn self>>;
  247.           Rub:  "Rubbing the electric lamp is not particularly \
  248.                  rewarding.  Anyway, nothing exciting happens.";
  249.           SwitchOn: if (self.number <= 0)
  250.                 "Unfortunately, the batteries seem to be dead.";
  251.           Receive:
  252.                 if (noun==old_batteries)
  253.                     "Those batteries are dead; they won't do any good at all.";
  254.                 if (noun == fresh_batteries) { ReplaceBatts(); rtrue; }
  255.                 "The only thing you might successfully put in \
  256.                  the lamp is a fresh pair of batteries.";
  257.        ],
  258.        after
  259.        [; SwitchOn: give self light; StartDaemon(self);
  260.           SwitchOff: give self ~light;
  261.        ],
  262.   has  switchable;
  263.  
  264. [ ReplaceBatts;
  265.   if (fresh_batteries in player || fresh_batteries in location)
  266.   {   remove fresh_batteries; give fresh_batteries general;
  267.       move old_batteries to location; brass_lantern.number = 2500;
  268.       "I'm taking the liberty of replacing the batteries.";
  269.   }
  270. ];
  271.  
  272.  
  273. Nearby bottle "small bottle"
  274.   with name "bottle" "jar" "flask",
  275.        initial "There is an empty bottle here.",
  276.        before
  277.        [; LetGo:
  278.              if (noun in bottle)
  279.                  "You're holding that already (in the bottle).";
  280.          Receive:
  281.              if (noun==stream or Oil) <<Fill self>>;
  282.              else "The bottle is only supposed to hold liquids.";
  283.          Fill:
  284.              if (child(bottle)~=0)
  285.                "The bottle is full already.";
  286.              if (stream in location || Spring in location)
  287.              {   move water_in_the_bottle to bottle;
  288.                  "The bottle is now full of water.";
  289.              }
  290.              if (Oil in location)
  291.              {   move oil_in_the_bottle to bottle;
  292.                  "The bottle is now full of oil.";
  293.              }
  294.              "There is nothing here with which to fill the bottle.";
  295.          Empty: if (child(bottle)==0) "The bottle is already empty!";
  296.              remove child(bottle);
  297.              "Your bottle is now empty and the ground is now wet.";
  298.        ],
  299.   has  container open;
  300.  
  301. Object water_in_the_bottle "bottled water"
  302.   with name "bottled" "water" "h2o", article "some",
  303.        before
  304.        [; Drink:  remove water_in_the_bottle; <<Drink Stream>>;
  305.        ],
  306.        description "It looks like ordinary water to me.";
  307.  
  308. Object oil_in_the_bottle "bottled oil"
  309.   with name "oil" "bottled" "lubricant" "grease", article "some",
  310.        before
  311.        [; Drink:  <<Drink Oil>>;
  312.        ],
  313.        description "It looks like ordinary oil to me.";
  314.  
  315.  
  316. Object In_Forest_1 "In Forest"
  317.   with description "You are in open forest, with a deep valley to one side.",
  318.        e_to In_A_Valley,
  319.        d_to In_A_Valley,
  320.        n_to In_Forest_1,
  321.        w_to In_Forest_1,
  322.        s_to In_Forest_1,
  323.        initial [; if (random(2)==1) PlayerTo(In_Forest_2,1); ],
  324.   has  light; 
  325.  
  326. Object In_Forest_2 "In Forest"
  327.   with description "You are in open forest near both a valley and a road.",
  328.        n_to At_End_Of_Road,
  329.        e_to In_A_Valley,
  330.        w_to In_A_Valley,
  331.        d_to In_A_Valley,
  332.        s_to In_Forest_1
  333.   has  light;
  334.  
  335.  
  336. Object In_A_Valley "In A Valley"
  337.   with description
  338.                 "You are in a valley in the forest beside a \
  339.                 stream tumbling along a rocky bed.",
  340.        n_to At_End_Of_Road,
  341.        e_to In_Forest_1,
  342.        w_to In_Forest_1,
  343.        u_to In_Forest_1,
  344.        s_to At_Slit_In_Streambed,
  345.        d_to At_Slit_In_Streambed, name "valley"
  346.   has  light;
  347.  
  348. Nearby Streambed "streambed"
  349.   with name "bed" "streambed" "rock" "small" "rocky" "bare" "dry"
  350.   has  scenery;
  351.  
  352.  
  353. Object At_Slit_In_Streambed "At Slit In Streambed"
  354.   with description "At your feet all the water of the stream \
  355.                     splashes into a 2-inch slit in the rock.  Downstream \
  356.                     the streambed is bare rock.",
  357.        n_to In_A_Valley,
  358.        e_to In_Forest_1,
  359.        w_to In_Forest_1,
  360.        s_to Outside_Grate,
  361.        before
  362.        [; Enter: if (noun==Slit)
  363.                      "You don't fit through a two-inch slit!";
  364.           Go:    if (noun==d_obj or in_obj)
  365.                      "You don't fit through a two-inch slit!";
  366.        ],
  367.   has  light;
  368.  
  369.  
  370. Nearby Slit "2-inch slit"
  371.   with description "It's just a 2-inch slit in the rock, through which the \
  372.                  stream is flowing.",
  373.        name "slit" "two" "inch"
  374.   has  scenery;
  375.  
  376.  
  377. Object Outside_Grate "Outside Grate"
  378.   with description
  379.                 "You are in a 20-foot depression floored with \
  380.                 bare dirt.  Set into the dirt is a strong steel grate \
  381.                 mounted in concrete.  A dry streambed leads into the \
  382.                 depression.",
  383.        e_to In_Forest_1,
  384.        w_to In_Forest_1,
  385.        s_to In_Forest_1,
  386.        n_to At_Slit_In_Streambed,
  387.        d_to 
  388.        [; if (Grate hasnt locked && Grate hasnt open)
  389.           {   print "(First opening the grate)^"; give Grate open; }
  390.           return Grate;
  391.        ],
  392.   has  light;
  393.  
  394. Nearby Depression "20-foot depression"
  395.   with description "You're standing in it.",
  396.        name "depression" "dirt" "twenty" "foot" "bare"
  397.   has  scenery;
  398.  
  399. Nearby Grate "steel grate"
  400.   with name "grate" "lock" "gate" "grille" "metal" "strong" "steel" "grating",
  401.        description "It just looks like an ordinary grate mounted in concrete.",
  402.        with_key set_of_keys,
  403.        door_dir
  404.        [; if (location==Below_The_Grate) return u_to; return d_to;
  405.        ],
  406.        door_to
  407.        [; if (location==Below_The_Grate) return Outside_Grate;
  408.           return Below_The_Grate;
  409.        ],
  410.        describe
  411.        [; if (self has open) "^The grate stands open.";
  412.           if (self hasnt locked) "^The grate is unlocked but shut.";
  413.           rtrue;
  414.        ],
  415.        found_in  Below_The_Grate  Outside_Grate
  416.   has  static door openable lockable locked;
  417.  
  418. ! ----------------------------------------------------------------------------
  419. !   Facilis descensus Averno...
  420. ! ----------------------------------------------------------------------------
  421.  
  422. Object Below_The_Grate "Below the Grate"
  423.   with description
  424.                "You are in a small chamber beneath a 3x3 steel \
  425.                grate to the surface. A low crawl over cobbles leads \
  426.                inward to the west.",
  427.        w_to In_Cobble_Crawl,
  428.        u_to Grate
  429.   has  light;
  430.  
  431.  
  432. Object Cobbles "cobbles"
  433.   with description "They're just ordinary cobbles.",
  434.        name "cobble" "cobbles" "cobblestones" "cobblestone" "stones" "stone",
  435.        found_in  In_Cobble_Crawl  In_Debris_Room  Below_The_Grate
  436.   has  scenery;
  437.  
  438. Object In_Cobble_Crawl "In Cobble Crawl"
  439.   with description
  440.                "You are crawling over cobbles in a low passage. \
  441.                There is a dim light at the east end of the \
  442.                passage.",
  443.        e_to Below_The_Grate,
  444.        w_to In_Debris_Room
  445.   has  light;
  446.  
  447. Nearby wicker_cage "wicker cage"
  448.   with description "It's a small wicker cage.",
  449.        initial "There is a small wicker cage discarded nearby.",
  450.        name "cage" "small" "wicker",
  451.        after
  452.        [; Open: if (little_bird notin self) rfalse;
  453.                 print "(releasing the little bird)^";
  454.                 <<Release little_bird>>;
  455.        ],
  456.   has  container open openable transparent;
  457.  
  458.  
  459. Object In_Debris_Room "In Debris Room"
  460.   with description
  461.                "You are in a debris room filled with stuff \
  462.                washed in from the surface. A low wide passage with \
  463.                cobbles becomes plugged with mud and debris here, but \
  464.                an awkward canyon leads upward and west.^^\
  465.                A note on the wall says, ~Magic word XYZZY.~",
  466.        e_to In_Cobble_Crawl,
  467.        u_to In_Awkward_Sloping_E_W_Canyon,
  468.        w_to In_Awkward_Sloping_E_W_Canyon,
  469.        before
  470.        [; Xyzzy: PlayerTo(Inside_Building); rtrue;
  471.        ],
  472.   has  nodwarf;
  473.  
  474. Nearby Debris "debris"
  475.   with description "Yuck.",
  476.        name "debris" "stuff" "mud"
  477.   has  scenery;
  478.  
  479. Nearby XyzzyNote "note"
  480.   with description "The note says ~Magic word XYZZY~.",
  481.        name "note"
  482.   has  scenery;
  483.  
  484. Nearby black_rod "black rod with a rusty star on the end"
  485.   with description "It's a three foot black rod with a rusty star on an end.",
  486.        initial "A three foot black rod \
  487.                 with a rusty star on one end lies nearby.",
  488.        name "rod" "star" "black" "rusty" "star" "three" "foot" "iron",
  489.        before
  490.        [; Wave:
  491.        if (location==West_Side_Of_Fissure or On_East_Bank_Of_Fissure)
  492.        {   if (caves_closed==1) "Peculiar.  Nothing happens.";
  493.            if (CrystalBridge notin nothing)
  494.            {   remove CrystalBridge; give CrystalBridge absent;
  495.                West_Side_Of_Fissure.e_to = 0;
  496.                On_East_Bank_Of_Fissure.w_to = 0;
  497.                "The crystal bridge has vanished!";
  498.            }
  499.            else
  500.            {   move CrystalBridge to location; give CrystalBridge ~absent;
  501.                West_Side_Of_Fissure.e_to = CrystalBridge;
  502.                On_East_Bank_Of_Fissure.w_to = CrystalBridge;
  503.                "A crystal bridge now spans the fissure.";
  504.            }
  505.        }
  506.        else "Nothing happens.";
  507.        ];
  508.  
  509.  
  510. Object In_Awkward_Sloping_E_W_Canyon "Sloping E/W Canyon"
  511.   with description
  512.                "You are in an awkward sloping east/west canyon.",
  513.        d_to In_Debris_Room,
  514.        e_to In_Debris_Room,
  515.        u_to In_Bird_Chamber,
  516.        w_to In_Bird_Chamber
  517.   has  nodwarf;
  518.  
  519. ! ----------------------------------------------------------------------------
  520. !   The little bird in its natural habitat
  521. ! ----------------------------------------------------------------------------
  522.  
  523. Object In_Bird_Chamber "Orange River Chamber"
  524.   with description
  525.                "You are in a splendid chamber thirty feet high. \
  526.                The walls are frozen rivers of orange stone.  An \
  527.                awkward canyon and a good passage exit from east and \
  528.                west sides of the chamber.",
  529.        e_to In_Awkward_Sloping_E_W_Canyon,
  530.        w_to At_Top_Of_Small_Pit
  531.   has  nodwarf;
  532.  
  533. Nearby little_bird "little bird"
  534.   with name "cheerful" "mournful" "little" "bird",
  535.        initial "A cheerful little bird is sitting here singing.",
  536.        before
  537.        [; Examine: if (little_bird in wicker_cage)
  538.               "The little bird looks unhappy in the cage.";
  539.             "The cheerful little bird is sitting here singing.";
  540.           Insert: if (second==wicker_cage) <<Catch self>>;
  541.               else 
  542.               {   print "Don't put the poor bird in "; DefArt(second);
  543.                   "!";
  544.               }
  545.           Drop, Remove:
  546.               if (little_bird in wicker_cage)
  547.               {   print "(The bird is released from the cage)^^";
  548.                   <<Release self>>;
  549.               }
  550.           Take, Catch:
  551.             if (little_bird in wicker_cage)
  552.               "You already have the little bird.  If \
  553.                          you take it out of the cage it will likely \
  554.                          fly away from you.";
  555.             if (wicker_cage notin player)
  556.               "You can catch the bird, but you cannot carry it.";
  557.             if (black_rod in player)
  558.               "The bird was unafraid when you entered, but \
  559.                      as you approach it becomes disturbed and you \
  560.                      cannot catch it.";
  561.             move little_bird to wicker_cage; give wicker_cage ~open;
  562.             "You catch the bird in the wicker cage.";
  563.           Release: if (little_bird notin wicker_cage)
  564.                        "The bird is not caged now.";
  565.             give wicker_cage open;
  566.             move little_bird to location;
  567.  
  568.             if (Snake in location)
  569.             {   remove Snake;
  570.                 "The little bird attacks the green snake, and \
  571.                            in an astounding flurry drives the snake \
  572.                            away.";
  573.             }
  574.  
  575.            if (Dragon in location)
  576.            {   remove little_bird;
  577.                "The little bird attacks the green dragon, \
  578.                           and in an astounding flurry gets burnt to a \
  579.                           cinder.  The ashes blow away.";
  580.            }
  581.  
  582.             "The little bird flies free.";
  583.        ],
  584.  
  585.        life
  586.        [; Give:  "It's not hungry. (It's merely pinin' for the \
  587.                      fjords).  Besides, I suspect it would prefer bird seed.";
  588.          Order, Ask, Answer: "Cheep!  Chirp!";
  589.          Attack:
  590.            if (little_bird in wicker_cage)
  591.                "Oh, leave the poor unhappy bird alone.";
  592.            remove little_bird;
  593.            "The little bird is now dead.  Its body disappears.";
  594.        ],
  595.   has  animate;
  596.  
  597.  
  598. Object At_Top_Of_Small_Pit "At Top of Small Pit"
  599.   with description
  600.                "At your feet is a small pit breathing traces of \
  601.                white mist.  A west passage ends here except for a \
  602.                small crack leading on.^^\
  603.                Rough stone steps lead down the pit.",
  604.        e_to In_Bird_Chamber,
  605.        w_to "The crack is far too small for you to follow.",
  606.        d_to
  607.        [; if (large_gold_nugget in player)
  608.           {   deadflag=1;
  609.               "You are at the bottom \
  610.                          of the pit with a broken neck.";
  611.           }
  612.           return In_Hall_Of_Mists;
  613.        ],
  614.        before
  615.        [; Enter: if (noun==PitCrack)
  616.               "The crack is far too small for you to follow.";
  617.        ],
  618.   has  nodwarf;
  619.  
  620.  
  621. Nearby SmallPit "small pit"
  622.   with description "The pit is breathing traces of white mist.",
  623.        name "pit" "small"
  624.   has  scenery;
  625.  
  626. Nearby PitCrack "crack"
  627.   with description
  628.            "The crack is very small -- far too small for you to follow.",
  629.        name "crack" "small"
  630.   has  scenery;
  631.  
  632. Object Mist "mist"
  633.   with description
  634.                "Mist is a white vapor, usually water, seen from time \
  635.                to time in caverns.  It can be found anywhere but is \
  636.                frequently a sign of a deep pit leading down to \
  637.                water.",
  638.        name "mist" "vapor" "wisps" "white",
  639.        found_in  At_Top_Of_Small_Pit In_Hall_Of_Mists
  640.                  On_East_Bank_Of_Fissure  At_Window_On_Pit_1
  641.                  At_West_End_Of_Hall_Of_Mists In_Misty_Cavern
  642.                  In_Mirror_Canyon  At_Reservoir At_Window_On_Pit_2
  643.                  On_Sw_Side_Of_Chasm
  644.   has  scenery;
  645.  
  646. ! ----------------------------------------------------------------------------
  647. !   The caves open up: The Hall of Mists
  648. ! ----------------------------------------------------------------------------
  649.  
  650. Object In_Hall_Of_Mists "In Hall of Mists"
  651.   with initial
  652.        [; if (self has general) rfalse;
  653.           score=score+25; give self general;
  654.        ],
  655.        description
  656.                "You are at one end of a vast hall stretching \
  657.                forward out of sight to the west.  There are openings \
  658.                to either side.  Nearby, a wide stone staircase leads \
  659.                downward.  The hall is filled with wisps of white \
  660.                mist swaying to and fro almost as if alive.  A cold \
  661.                wind blows up the staircase.  There is a passage at \
  662.                the top of a dome behind you.^^\
  663.                Rough stone steps lead up the dome.",
  664.        s_to In_Nugget_Of_Gold_Room,
  665.        w_to On_East_Bank_Of_Fissure,
  666.        d_to In_Hall_Of_Mt_King,
  667.        n_to In_Hall_Of_Mt_King,
  668.        u_to
  669.        [; if (large_gold_nugget in player)
  670.               "The dome is unclimbable.";
  671.           return At_Top_Of_Small_Pit;
  672.        ];
  673.  
  674. Nearby Staircase "wide stone staircase"
  675.   with description "The staircase leads down.",
  676.        name "stair" "stairs" "staircase" "wide" "stone"
  677.   has  scenery;
  678.  
  679. Nearby DomeSteps "rough stone steps"
  680.   with description "The rough stone steps lead up the dome.",
  681.        name "stair" "stairs" "staircase" "rough" "stone"
  682.   has  scenery;
  683.  
  684. Nearby Dome "dome"
  685.   with name "dome",
  686.        before
  687.        [; Examine: if (large_gold_nugget in player)
  688.                      "I'm not sure you'll be able to get up it \
  689.                                 with what you're carrying.";
  690.                    "It looks like you might be able to climb up it.";
  691.          Climb: MovePlayer(u_obj); rtrue;
  692.        ],
  693.   has  scenery;
  694.  
  695.  
  696. Object In_Nugget_Of_Gold_Room "Low Room"
  697.   with description
  698.                "This is a low room with a crude note on the \
  699.                wall:^^~You won't get it up the steps~.",
  700.        n_to In_Hall_Of_Mists;
  701.  
  702. Nearby NuggetNote "note"
  703.   with description "The note says, ~You won't get it up the steps~.",
  704.        name "note" "crude"
  705.   has  scenery;
  706.  
  707. Nearby large_gold_nugget "large gold nugget"
  708.  class Treasure
  709.   with description "It's a large sparkling nugget of gold!",
  710.        initial "There is a large sparkling nugget of gold here!",
  711.        name "gold" "nugget" "large" "heavy";
  712.  
  713.  
  714. Class  FissureRoom
  715.   with before
  716.        [;
  717.           Jump: if (CrystalBridge hasnt absent)
  718.                   "I respectfully suggest you go across the \
  719.                              bridge instead of jumping.";
  720.                 deadflag=1;
  721.                 "You didn't make it.";
  722.        ],
  723.        d_to "The fissure is too terrifying!";
  724.  
  725.  
  726. Object On_East_Bank_Of_Fissure "On East Bank of Fissure"
  727.  class FissureRoom
  728.   with description
  729.                "You are on the east bank of a fissure slicing \
  730.                clear across the hall. The mist is quite thick here, \
  731.                and the fissure is too wide to jump.",
  732.        e_to In_Hall_Of_Mists, w_to "The fissure is too wide.";
  733.  
  734. Object West_Side_Of_Fissure "West Side of Fissure"
  735.  class FissureRoom
  736.   with description
  737.                "You are on the west side of the fissure in the \
  738.                hall of mists.",
  739.        w_to At_West_End_Of_Hall_Of_Mists,
  740.        e_to "The fissure is too wide.",
  741.        n_to At_West_End_Of_Hall_Of_Mists,
  742.        before
  743.        [; Go: if (location==West_Side_Of_Fissure && noun==n_obj)
  744.                 print "You have crawled through a very low wide passage \
  745.                        parallel to and north of the hall of mists.^";
  746.        ];
  747.  
  748.  
  749. Object CrystalBridge "crystal bridge"
  750.   with initial "A crystal bridge now spans the fissure.",
  751.        description "It spans the fissure, thereby providing you a way across.",
  752.        door_dir
  753.        [; if (location==West_Side_Of_Fissure) return e_to; return w_to;
  754.        ],
  755.        door_to
  756.        [; if (location==West_Side_Of_Fissure) return On_East_Bank_Of_Fissure;
  757.           return West_Side_Of_Fissure;
  758.        ],
  759.        door_to 0, door_dir 0,
  760.        name "crystal" "bridge",
  761.        found_in On_East_Bank_Of_Fissure West_Side_Of_Fissure
  762.   has  static door open absent;
  763.  
  764. Object BridgeFissure "fissure"
  765.   with name "wide" "fissure",
  766.        description "The fissure looks far too wide to jump.",
  767.        found_in  On_East_Bank_Of_Fissure  West_Side_Of_Fissure
  768.   has  scenery;
  769.  
  770. Object several_diamonds "diamonds" West_Side_Of_Fissure
  771.  class Treasure
  772.   with article "some",
  773.        description "They look to be of the highest quality!",
  774.        initial "There are diamonds here!",
  775.        name "diamond" "diamonds" "several" "high" "quality";
  776.  
  777. Object At_West_End_Of_Hall_Of_Mists "At West End of Hall of Mists"
  778.   with description
  779.                "You are at the west end of the hall of mists.  \
  780.                A low wide crawl continues west and another goes \
  781.                north.  To the south is a little passage 6 feet off \
  782.                the floor.",
  783.        s_to Alike_Maze_1,
  784.        u_to Alike_Maze_1,
  785.        e_to West_Side_Of_Fissure,
  786.        w_to At_East_End_Of_Long_Hall,
  787.        n_to West_Side_Of_Fissure,
  788.        before
  789.        [; Go: if (noun==n_obj)
  790.                 print "You have crawled through a very low wide passage \
  791.                        parallel to and north of the hall of mists.^";
  792.        ];
  793.  
  794. ! ----------------------------------------------------------------------------
  795. !   Long Hall to the west of the Hall of Mists
  796. ! ----------------------------------------------------------------------------
  797.  
  798. Object At_East_End_Of_Long_Hall "At East End of Long Hall"
  799.   with description
  800.                "You are at the east end of a very long hall \
  801.                apparently without side chambers.  To the east a low \
  802.                wide crawl slants up.  To the north a round two foot \
  803.                hole slants down.",
  804.        e_to At_West_End_Of_Hall_Of_Mists,
  805.        u_to At_West_End_Of_Hall_Of_Mists,
  806.        w_to At_West_End_Of_Long_Hall,
  807.        n_to Crossover,
  808.        d_to Crossover;
  809.  
  810. Object At_West_End_Of_Long_Hall "At West End of Long Hall"
  811.   with description
  812.                "You are at the west end of a very long \
  813.                featureless hall.  The hall joins up with a narrow \
  814.                north/south passage.",
  815.        e_to At_East_End_Of_Long_Hall,
  816.        s_to Different_Maze_1,
  817.        n_to Crossover;
  818.  
  819. Object Crossover "N/S and E/W Crossover"
  820.   with description
  821.                "You are at a crossover of a high N/S passage \
  822.                and a low E/W one.",
  823.        w_to At_East_End_Of_Long_Hall,
  824.        n_to Dead_End_7,
  825.        e_to In_West_Side_Chamber,
  826.        s_to At_West_End_Of_Long_Hall;
  827.  
  828. Nearby TheCrossover "crossover"
  829.   with description "You know as much as I do at this point.",
  830.        name "crossover" "over" "cross"
  831.   has  scenery;
  832.  
  833.  
  834. Class  DeadEndRoom
  835.   with description "You have reached a dead end.",
  836.        cant_go "You'll have to go back the way you came.";
  837.  
  838. Object Dead_End_7 "Dead End"
  839.  class DeadEndRoom
  840.   with s_to Crossover,
  841.        out_to Crossover;
  842.  
  843. ! ----------------------------------------------------------------------------
  844. !   The Hall of the Mountain King and side chambers
  845. ! ----------------------------------------------------------------------------
  846.  
  847. Object In_Hall_Of_Mt_King "Hall of the Mountain King"
  848.   with description
  849.                "You are in the hall of the mountain king, with \
  850.                passages off in all directions.",
  851.        cant_go "Well, perhaps not quite all directions.",
  852.        u_to In_Hall_Of_Mists,
  853.        e_to In_Hall_Of_Mists,
  854.        n_to Low_N_S_Passage,
  855.        s_to In_South_Side_Chamber,
  856.        w_to In_West_Side_Chamber,
  857.        sw_to In_Secret_E_W_Canyon,
  858.        before
  859.        [; Go: if (Snake notin nothing
  860.                   && ((noun==n_obj or s_obj or w_obj)
  861.                       || (noun==sw_obj && random(100)<=35)))
  862.                   "You can't get by the snake.";
  863.        ];
  864.  
  865. Nearby Snake "snake"
  866.   with description "I wouldn't mess with it if I were you.",
  867.        initial "A huge green fierce snake bars the way!",
  868.        name "snake" "cobra" "asp" "huge" "fierce" "green"
  869.             "ferocious" "venemous" "venomous" "large" "big" "killer",
  870.        life
  871.        [; Order, Ask, Answer: "Hiss!";
  872.          ThrowAt: if (noun==axe) <<Attack self>>;
  873.                   <<Give noun self>>;
  874.          Give: if (noun==little_bird)
  875.                {   remove little_bird;
  876.                    "The snake has now devoured your bird.";
  877.                }
  878.                "There's nothing here it wants to eat (except \
  879.                    perhaps you).";
  880.          Attack: "Attacking the snake both doesn't work \
  881.                    and is very dangerous.";
  882.          Take: deadflag=1; "It takes you instead.  Glrp!";
  883.        ],
  884.   has  animate;
  885.  
  886.  
  887. Object Low_N_S_Passage "Low N/S Passage"
  888.   with description
  889.                "You are in a low N/S passage at a hole in the \
  890.                floor.  The hole goes down to an E/W passage.",
  891.        s_to In_Hall_Of_Mt_King,
  892.        d_to In_Dirty_Passage,
  893.        n_to At_Y2;
  894.  
  895. Nearby bars_of_silver "bars of silver"
  896.  class Treasure
  897.   with description "They're probably worth a fortune!",
  898.        initial "There are bars of silver here!",
  899.        article "some",
  900.        name "silver" "bars";
  901.  
  902.  
  903. Object In_South_Side_Chamber "In South Side Chamber"
  904.   with description
  905.                "You are in the south side chamber.",
  906.        n_to In_Hall_Of_Mt_King;
  907.  
  908. Nearby precious_jewelry "precious jewelry"
  909.  class Treasure
  910.   with description "It's all quite exquisite!",
  911.        initial "There is precious jewelry here!",
  912.        article "some",
  913.        name "jewel" "jewels" "jewelry" "precious" "exquisite";
  914.  
  915.  
  916. Object In_West_Side_Chamber "In West Side Chamber"
  917.   with description
  918.                "You are in the west side chamber of the hall of \
  919.                the mountain king. A passage continues west and up \
  920.                here.",
  921.        w_to Crossover,
  922.        u_to Crossover,
  923.        e_to In_Hall_Of_Mt_King;
  924.  
  925. Nearby rare_coins "rare coins"
  926.  class Treasure
  927.   with description "They're a numismatist's dream!",
  928.        initial "There are many coins here!", article "many",
  929.        name "coins" "rare";
  930.  
  931. ! ----------------------------------------------------------------------------
  932. !   The Y2 Rock Room and environs, slightly below
  933. ! ----------------------------------------------------------------------------
  934.  
  935. Object At_Y2 "At ~Y2~"
  936.   with description
  937.                "You are in a large room, with a passage to the \
  938.                south, a passage to the west, and a wall of broken \
  939.                rock to the east. There is a large ~Y2~ on \
  940.                a rock in the room's center.",
  941.        after
  942.        [; Look: if (random(100)<=25) print "^A hollow voice says, ~Plugh.~^";
  943.        ],
  944.        before
  945.        [;
  946.           Plugh: PlayerTo(Inside_Building); rtrue;
  947.           Plover: if (In_Plover_Room hasnt visited) rfalse;
  948.                   if (egg_sized_emerald in player)
  949.                   move egg_sized_emerald to In_Plover_Room;
  950.                   PlayerTo(In_Plover_Room); rtrue;
  951.        ],
  952.        s_to Low_N_S_Passage,
  953.        e_to Jumble_Of_Rock,
  954.        w_to At_Window_On_Pit_1;
  955.  
  956. Object Y2Rock "~Y2~ rock" At_Y2
  957.   with description "There is a large ~Y2~ painted on the rock.",
  958.        name "rock" "y2"
  959.   has  scenery supporter;
  960.  
  961. Object Jumble_Of_Rock "Jumble of Rock"
  962.   with description "You are in a jumble of rock, with cracks everywhere.",
  963.        d_to At_Y2,
  964.        u_to In_Hall_Of_Mists;
  965.  
  966. Object At_Window_On_Pit_1 "At Window on Pit"
  967.   with description
  968.                "You're at a low window overlooking a huge pit, \
  969.                which extends up out of sight.  A floor is \
  970.                indistinctly visible over 50 feet below.  Traces of \
  971.                white mist cover the floor of the pit, becoming \
  972.                thicker to the right. Marks in the dust around the \
  973.                window would seem to indicate that someone has been \
  974.                here recently.  Directly across the pit from you and \
  975.                25 feet away there is a similar window looking into a \
  976.                lighted room.  A shadowy figure can be seen there \
  977.                peering back at you.",
  978.        before
  979.        [; WaveHands: "The shadowy figure waves back at you!";
  980.        ],
  981.        cant_go "The only passage is back east to Y2.",
  982.        e_to At_Y2;
  983.  
  984. Object Window "window"
  985.   with description "It looks like a regular window.",
  986.        name "window" "low",
  987.        found_in  At_Window_On_Pit_1 At_Window_On_Pit_2
  988.   has  scenery openable;
  989.  
  990. Object WindowPit "huge pit"
  991.   with description
  992.                "It's so deep you can barely make out the floor below, \
  993.                and the top isn't visible at all.",
  994.        name "pit" "deep" "large",
  995.        found_in  At_Window_On_Pit_1 At_Window_On_Pit_2
  996.   has  scenery;
  997.  
  998. Object MarksInTheDust "marks in the dust"
  999.   with description "Evidently you're not alone here.",
  1000.        name "marks" "dust",
  1001.        found_in  At_Window_On_Pit_1 At_Window_On_Pit_2
  1002.   has  scenery;
  1003.  
  1004. Object ShadowyFigure "shadowy figure"
  1005.   with description
  1006.                "The shadowy figure seems to be trying to attract \
  1007.                your attention.",
  1008.        found_in  At_Window_On_Pit_1 At_Window_On_Pit_2,
  1009.        name "figure" "shadow" "person" "individual" "shadowy" "mysterious"
  1010.   has  scenery;
  1011.  
  1012.  
  1013.  
  1014. Object In_Dirty_Passage "Dirty Passage"
  1015.   with description
  1016.                "You are in a dirty broken passage.  To the east \
  1017.                is a crawl.  To the west is a large passage.  Above \
  1018.                you is a hole to another passage.",
  1019.        e_to On_Brink_Of_Pit,
  1020.        u_to Low_N_S_Passage,
  1021.        w_to In_Dusty_Rock_Room;
  1022.  
  1023. Object On_Brink_Of_Pit "Brink of Pit"
  1024.   with description
  1025.                "You are on the brink of a small clean climbable \
  1026.                pit.  A crawl leads west.",
  1027.        w_to In_Dirty_Passage,
  1028.        d_to In_Pit,
  1029.        in_to In_Pit;
  1030.  
  1031. Object CleanPit "small pit" On_Brink_Of_Pit
  1032.   with description "It looks like you might be able to climb down into it.",
  1033.        name "pit" "small" "clean" "climbable",
  1034.        before
  1035.        [; Climb, Enter: MovePlayer(d_obj); rtrue; ],
  1036.   has  scenery;
  1037.  
  1038.  
  1039. Object In_Pit "In Pit"
  1040.   with description
  1041.                "You are in the bottom of a small pit with a \
  1042.                little stream, which enters and exits through tiny \
  1043.                slits.",
  1044.        u_to On_Brink_Of_Pit,
  1045.        d_to "You don't fit through the tiny slits!"
  1046.   has  nodwarf;
  1047.  
  1048.  
  1049. Nearby PitSlits "tiny slits"
  1050.   with description "The slits form a complex pattern in the rock.",
  1051.        name "slit" "slits" "tiny"
  1052.   has  scenery;
  1053.  
  1054. Object In_Dusty_Rock_Room "In Dusty Rock Room"
  1055.   with description
  1056.                "You are in a large room full of dusty rocks.  \
  1057.                There is a big hole in the floor.  There are cracks \
  1058.                everywhere, and a passage leading east.",
  1059.        e_to In_Dirty_Passage,
  1060.        d_to At_Complex_Junction;
  1061.  
  1062. Nearby DustyRocks "dusty rocks"
  1063.   with description "They're just rocks.  (Dusty ones, that is.)",
  1064.        name "rocks" "boulders" "stones" "rock" "boulder" "stone"
  1065.        "dusty" "dirty"
  1066.   has  scenery;
  1067.  
  1068. ! ----------------------------------------------------------------------------
  1069. !   A maze of twisty little passages, all alike...
  1070. ! ----------------------------------------------------------------------------
  1071.  
  1072. Class  MazeRoom
  1073.   with description "You are in a maze of twisty little passages, \
  1074.            all alike.",
  1075.        out_to "Easier said than done.";
  1076.  
  1077.  
  1078. Object Alike_Maze_1 "Maze"
  1079.  class MazeRoom
  1080.   with 
  1081.        u_to At_West_End_Of_Hall_Of_Mists,
  1082.        n_to Alike_Maze_1,
  1083.        e_to Alike_Maze_2,
  1084.        s_to Alike_Maze_4,
  1085.        w_to Alike_Maze_11;
  1086.  
  1087. Object Alike_Maze_2 "Maze"
  1088.  class MazeRoom
  1089.   with 
  1090.        w_to Alike_Maze_1,
  1091.        s_to Alike_Maze_3,
  1092.        e_to Alike_Maze_4;
  1093.  
  1094. Object Alike_Maze_3 "Maze"
  1095.  class MazeRoom
  1096.   with 
  1097.        e_to Alike_Maze_2,
  1098.        d_to Dead_End_3,
  1099.        s_to Alike_Maze_6,
  1100.        n_to Dead_End_13;
  1101.  
  1102. Object Alike_Maze_4 "Maze"
  1103.  class MazeRoom
  1104.   with 
  1105.        w_to Alike_Maze_1,
  1106.        n_to Alike_Maze_2,
  1107.        e_to Dead_End_1,
  1108.        s_to Dead_End_2,
  1109.        u_to Alike_Maze_14,
  1110.        d_to Alike_Maze_14;
  1111.  
  1112. Object Alike_Maze_5 "Maze"
  1113.  class MazeRoom
  1114.   with 
  1115.        e_to Alike_Maze_6,
  1116.        w_to Alike_Maze_7;
  1117.  
  1118. Object Alike_Maze_6 "Maze"
  1119.  class MazeRoom
  1120.   with 
  1121.        e_to Alike_Maze_3,
  1122.        w_to Alike_Maze_5,
  1123.        d_to Alike_Maze_7,
  1124.        s_to Alike_Maze_8;
  1125.  
  1126. Object Dead_End_1 "Dead End"
  1127.  class DeadEndRoom
  1128.   with 
  1129.        w_to Alike_Maze_4,
  1130.        out_to Alike_Maze_4;
  1131.  
  1132. Object Dead_End_2 "Dead End"
  1133.  class DeadEndRoom
  1134.   with 
  1135.        w_to Alike_Maze_4,
  1136.        out_to Alike_Maze_4;
  1137.  
  1138. Object Dead_End_3 "Dead End"
  1139.  class DeadEndRoom
  1140.   with 
  1141.        u_to Alike_Maze_3,
  1142.        out_to Alike_Maze_3;
  1143.  
  1144. Object Alike_Maze_7 "Maze"
  1145.  class MazeRoom
  1146.   with 
  1147.        w_to Alike_Maze_5,
  1148.        u_to Alike_Maze_6,
  1149.        e_to Alike_Maze_8,
  1150.        s_to Alike_Maze_9;
  1151.  
  1152. Object Alike_Maze_8 "Maze"
  1153.  class MazeRoom
  1154.   with 
  1155.        w_to Alike_Maze_6,
  1156.        e_to Alike_Maze_7,
  1157.        s_to Alike_Maze_8,
  1158.        u_to Alike_Maze_9,
  1159.        n_to Alike_Maze_10,
  1160.        d_to Dead_End_12;
  1161.  
  1162. Object Alike_Maze_9 "Maze"
  1163.  class MazeRoom
  1164.   with 
  1165.        w_to Alike_Maze_7,
  1166.        n_to Alike_Maze_8,
  1167.        s_to Dead_End_4;
  1168.  
  1169. Object Dead_End_4 "Dead End"
  1170.  class DeadEndRoom
  1171.   with 
  1172.        w_to Alike_Maze_9,
  1173.        out_to Alike_Maze_9;
  1174.  
  1175.  
  1176. Object Alike_Maze_10 "Maze"
  1177.  class MazeRoom
  1178.   with 
  1179.        w_to Alike_Maze_8,
  1180.        n_to Alike_Maze_10,
  1181.        d_to Dead_End_5,
  1182.        e_to At_Brink_Of_Pit;
  1183.  
  1184. Object Dead_End_5 "Dead End"
  1185.  class DeadEndRoom
  1186.   with 
  1187.        u_to Alike_Maze_10,
  1188.        out_to Alike_Maze_10;
  1189.  
  1190.  
  1191. Object At_Brink_Of_Pit "At Brink of Pit"
  1192.   with description
  1193.                "You are on the brink of a thirty foot pit with \
  1194.                a massive orange column down one wall.  You could \
  1195.                climb down here but you could not get back up.  The \
  1196.                maze continues at this level.",
  1197.        d_to In_Bird_Chamber,
  1198.        w_to Alike_Maze_10,
  1199.        s_to Dead_End_6,
  1200.        n_to Alike_Maze_12,
  1201.        e_to Alike_Maze_13;
  1202.  
  1203. Nearby OrangeColumn "massive orange column"
  1204.   with description "It looks like you could climb down it.",
  1205.        name "column" "massive" "orange" "big" "huge",
  1206.        before [; Climb: MovePlayer(d_obj); rtrue; ],
  1207.   has  scenery;
  1208.  
  1209. Nearby ThirtyFootPit "pit"
  1210.   with description "You'll have to climb down to find out anything more...",
  1211.        name "pit" "thirty" "foot" "thirty-foot",
  1212.        before [; Climb: MovePlayer(d_obj); rtrue; ],
  1213.   has  scenery;
  1214.  
  1215. Object Dead_End_6 "Dead End"
  1216.  class DeadEndRoom
  1217.   with e_to At_Brink_Of_Pit,
  1218.        out_to At_Brink_Of_Pit;
  1219.  
  1220. ! ----------------------------------------------------------------------------
  1221. !   A line of three vital junctions, east to west
  1222. ! ----------------------------------------------------------------------------
  1223.  
  1224. Object At_Complex_Junction "At Complex Junction"
  1225.   with description
  1226.                "You are at a complex junction.  A low hands and \
  1227.                knees passage from the north joins a higher crawl \
  1228.                from the east to make a walking passage going west.  \
  1229.                There is also a large room above.  The air is damp \
  1230.                here.",
  1231.        u_to In_Dusty_Rock_Room,
  1232.        w_to In_Bedquilt,
  1233.        n_to In_Shell_Room,
  1234.        e_to In_Anteroom;
  1235.  
  1236. Object In_Bedquilt "Bedquilt"
  1237.   with description
  1238.                "You are in bedquilt, a long east/west passage \
  1239.                with holes everywhere. To explore at random select \
  1240.                north, south, up, or down.",
  1241.        e_to At_Complex_Junction,
  1242.        w_to In_Swiss_Cheese_Room,
  1243.        s_to In_Slab_Room,
  1244.        u_to In_Dusty_Rock_Room,
  1245.        n_to At_Junction_Of_Three,
  1246.        d_to In_Anteroom,
  1247.        before
  1248.        [ destiny;
  1249.          Go: if (noun==s_obj or d_obj && random(100)<=80) destiny=1;
  1250.              if (noun==u_obj && random(100)<=80) destiny=1;
  1251.              if (noun==u_obj && random(100)<=50)
  1252.                  destiny=In_Secret_N_S_Canyon_1;
  1253.              if (noun==n_obj && random(100)<=60) destiny=1;
  1254.              if (noun==n_obj && random(100)<=75)
  1255.                  destiny=In_Large_Low_Room;
  1256.              if (destiny==1)
  1257.                  "You have crawled around in some little holes and \
  1258.                             wound up back in the main passage.";
  1259.              if (destiny==0) rfalse;
  1260.              PlayerTo(destiny); rtrue;
  1261.        ];
  1262.  
  1263.  
  1264. Object In_Swiss_Cheese_Room "In Swiss Cheese Room"
  1265.   with description
  1266.                "You are in a room whose walls resemble swiss \
  1267.                cheese.  Obvious passages go west, east, ne, and nw.  \
  1268.                Part of the room is occupied by a large bedrock \
  1269.                block.",
  1270.        w_to At_East_End_Of_Twopit_Room,
  1271.        s_to In_Tall_E_W_Canyon,
  1272.        ne_to In_Bedquilt,
  1273.        nw_to In_Oriental_Room,
  1274.        e_to In_Soft_Room,
  1275.        before
  1276.        [; Go: if ((noun==s_obj && random(100) <= 80)
  1277.                   || (noun==nw_obj && random(100) <= 50))
  1278.               "You have crawled around in some little holes and \
  1279.                          wound up back in the main passage.";
  1280.        ];
  1281.  
  1282.  
  1283. Nearby BedrockBlock "bedrock block"
  1284.   with description "It's just a huge block.",
  1285.        name "block" "bedrock" "large",
  1286.        before [; LookUnder, Push, Pull, Take:
  1287.                   "Surely you're joking."; ],
  1288.   has  scenery;
  1289.  
  1290. ! ----------------------------------------------------------------------------
  1291. !   The Twopit Room area
  1292. ! ----------------------------------------------------------------------------
  1293.  
  1294. Object At_West_End_Of_Twopit_Room "At West End of Twopit Room"
  1295.   with description
  1296.                "You are at the west end of the twopit room.  \
  1297.                There is a large hole in the wall above the pit at \
  1298.                this end of the room.",
  1299.        e_to At_East_End_Of_Twopit_Room,
  1300.        w_to In_Slab_Room,
  1301.        d_to In_West_Pit,
  1302.        u_to "It is too far up for you to reach.",
  1303.        before
  1304.        [; Enter: if (noun==HoleAbovePit_1)
  1305.               "It is too far up for you to reach.";
  1306.        ];
  1307.  
  1308. Object PlantStickingUp "beanstalk"
  1309.   with found_in  At_West_End_Of_Twopit_Room  At_East_End_Of_Twopit_Room,
  1310.        name "plant" "beanstalk" "stalk"
  1311.             "bean" "giant" "tiny" "little" "murmuring"
  1312.             "twelve" "foot" "tall" "bellowing",
  1313.        describe
  1314.        [;  if (Plant.number == 1)
  1315.                "The top of a 12-foot-tall beanstalk is \
  1316.                           poking out of the west pit.";
  1317.            "There is a huge beanstalk growing out of the \
  1318.                           west pit up to the hole.";
  1319.        ],
  1320.        before
  1321.        [; Examine: RunRoutines(self,describe); rtrue;
  1322.           Climb: if (Plant.number==2) <<Climb Plant>>;
  1323.        ],
  1324.   has  absent static;
  1325.  
  1326. Object HoleAbovePit_1 "hole above pit"
  1327.   with description
  1328.                "The hole is in the wall above the pit at \
  1329.                this end of the room.",
  1330.        name "hole" "large" "above" "pit",
  1331.        found_in In_West_Pit At_West_End_Of_Twopit_Room
  1332.   has  scenery;
  1333.  
  1334.  
  1335. Object In_West_Pit "In West Pit"
  1336.   with description
  1337.                "You are at the bottom of the western pit in the \
  1338.                twopit room.  There is a large hole in the wall about \
  1339.                25 feet above you.",
  1340.        before
  1341.        [; Climb:
  1342.            if (noun==Plant) rfalse;
  1343.            if (Plant.number < 1 || Plant.number > 2)
  1344.                "There is nothing here to climb.  Use ~up~ \
  1345.                           or ~out~ to leave the pit.";
  1346.        ],
  1347.        u_to At_West_End_Of_Twopit_Room
  1348.   has  nodwarf;
  1349.  
  1350. Nearby Plant "plant"
  1351.   with number 0,
  1352.        name "plant" "beanstalk" "stalk"
  1353.             "bean" "giant" "tiny" "little" "murmuring"
  1354.             "twelve" "foot" "tall" "bellowing",
  1355.        describe
  1356.        [; if (self.number == 0)
  1357.               "There is a tiny little plant in the pit, \
  1358.                          murmuring ~Water, water, ...~";
  1359.           if (self.number == 1)
  1360.               "There is a 12-foot-tall beanstalk stretching \
  1361.                          up out of the pit, bellowing ~Water!! Water!!~";
  1362.           if (self.number == 2)
  1363.               "There is a gigantic beanstalk stretching all \
  1364.                         the way up to the hole.";
  1365.        ],
  1366.        before
  1367.        [ conts;
  1368.          Climb: if (self.number == 0) "It's just a little plant!";
  1369.                 if (self.number == 1)
  1370.                 {   print "You have climbed up the plant and out of the pit.^";
  1371.                     PlayerTo(At_West_End_Of_Twopit_Room); rtrue;
  1372.                 }
  1373.                 if (self.number == 2)
  1374.                 {   print "You clamber up the plant and scurry through \
  1375.                            the hole at the top.^";
  1376.                     PlayerTo(In_Narrow_Corridor); rtrue;
  1377.                 }
  1378.          Take:  "The plant has exceptionally deep roots and \
  1379.                    cannot be pulled free.";
  1380.          Water: if (bottle notin player)
  1381.                     "You have nothing to water the plant with.";
  1382.                 conts=child(bottle);
  1383.                 if (conts==0) "The bottle is empty.";
  1384.                 remove conts;
  1385.                 if (conts==oil_in_the_bottle)
  1386.                     "The plant indignantly shakes the oil \
  1387.                                off its leaves and asks, ~Water?~";
  1388.                 self.number = self.number + 1;
  1389.                 give PlantStickingUp ~absent;
  1390.                 if (self.number == 1)
  1391.                     print "The plant spurts into furious growth for a \
  1392.                         few seconds.^^";
  1393.                 if (self.number == 2)
  1394.                     print "The plant grows explosively, almost filling \
  1395.                         the bottom of the pit.^^";
  1396.                 if (self.number == 3)
  1397.                 {   print "You've over-watered the plant!  It's \
  1398.                         shriveling up!  It's, it's...^^";
  1399.                     give PlantStickingUp absent; remove PlantStickingUp;
  1400.                     self.number = 0;
  1401.                 }
  1402.                 <<Examine self>>;
  1403.          Oil:   <<Water self>>;
  1404.          Examine: RunRoutines(self,describe); rtrue;
  1405.        ];
  1406.        
  1407.  
  1408. Object At_East_End_Of_Twopit_Room "At East End of Twopit Room"
  1409.   with description
  1410.                "You are at the east end of the twopit room.  \
  1411.                The floor here is littered with thin rock slabs, \
  1412.                which make it easy to descend the pits. There is a \
  1413.                path here bypassing the pits to connect passages from \
  1414.                east and west.  There are holes all over, but the \
  1415.                only big one is on the wall directly over the west \
  1416.                pit where you can't get to it.",
  1417.        e_to In_Swiss_Cheese_Room,
  1418.        w_to At_West_End_Of_Twopit_Room,
  1419.        d_to In_East_Pit;
  1420.  
  1421.  
  1422. Nearby Slabs "thin rock slabs"
  1423.   with 
  1424.        description "They almost form natural stairs down into the pit.",
  1425.        name "slabs" "slab" "rocks" "stairs" "thin" "rock",
  1426.        before
  1427.        [; LookUnder, Push, Pull, Take: "Surely you're joking.";
  1428.        ],
  1429.   has  scenery;
  1430.  
  1431.  
  1432. Object In_East_Pit "In East Pit"
  1433.   with description
  1434.                "You are at the bottom of the eastern pit in the \
  1435.                twopit room.  There is a small pool of oil in one \
  1436.                corner of the pit.",
  1437.        u_to At_East_End_Of_Twopit_Room
  1438.   has  nodwarf;
  1439.  
  1440. Nearby Oil "pool of oil"
  1441.   with name "pool" "oil" "small",
  1442.        description "It looks like ordinary oil.",
  1443.        before
  1444.        [; Drink:  "Absolutely not.";
  1445.           Take:   if (bottle notin player)
  1446.                       "You have nothing in which to carry the oil.";
  1447.                   <<Fill bottle>>;
  1448.           Insert: if (second == bottle) <<Fill bottle>>;
  1449.                       "You have nothing in which to carry the oil.";
  1450.        ],
  1451.   has  scenery;
  1452.  
  1453. Object HoleAbovePit_2 "hole above pit"
  1454.   with description
  1455.                "The hole is in the wall above you.",
  1456.        name "hole" "large" "above" "pit",
  1457.        found_in In_East_Pit At_East_End_Of_Twopit_Room
  1458.   has  scenery;
  1459.  
  1460.  
  1461. Object In_Slab_Room "Slab Room"
  1462.   with description
  1463.                "You are in a large low circular chamber whose \
  1464.                floor is an immense slab fallen from the ceiling \
  1465.                (slab room).  East and west there once were large \
  1466.                passages, but they are now filled with boulders.  Low \
  1467.                small passages go north and south, and the south one \
  1468.                quickly bends west around the boulders.",
  1469.        s_to At_West_End_Of_Twopit_Room,
  1470.        u_to In_Secret_N_S_Canyon_0,
  1471.        n_to In_Bedquilt;
  1472.  
  1473. Nearby Slab "slab"
  1474.   with description "It is now the floor here.",
  1475.        name "slab" "immense",
  1476.        before [; LookUnder, Push, Pull, Take:
  1477.                   "Surely you're joking."; ],
  1478.   has  scenery;
  1479.  
  1480. Nearby SlabBoulders "boulders"
  1481.   with description "They're just ordinary boulders.",
  1482.        name "boulder" "boulders" "rocks" "stones"
  1483.   has  scenery;
  1484.  
  1485. ! ----------------------------------------------------------------------------
  1486. !   A small network of Canyons, mainly Secret
  1487. ! ----------------------------------------------------------------------------
  1488.  
  1489. Object In_Secret_N_S_Canyon_0 "Secret N/S Canyon"
  1490.   with description
  1491.                "You are in a secret N/S canyon above a large \
  1492.                room.",
  1493.        d_to In_Slab_Room,
  1494.        s_to In_Secret_Canyon,
  1495.        n_to In_Mirror_Canyon,
  1496.        before
  1497.        [; Go: if (noun==s_obj) canyon_from=self;
  1498.        ];
  1499.  
  1500. Object In_Secret_N_S_Canyon_1 "Secret N/S Canyon"
  1501.   with description
  1502.                "You are in a secret N/S canyon above a sizable \
  1503.                passage.",
  1504.        n_to At_Junction_Of_Three,
  1505.        d_to In_Bedquilt,
  1506.        s_to Atop_Stalactite;
  1507.  
  1508. Object At_Junction_Of_Three
  1509.        "Junction of Three Secret Canyons"
  1510.   with description
  1511.                "You are in a secret canyon at a junction of \
  1512.                three canyons, bearing north, south, and se.  The \
  1513.                north one is as tall as the other two combined.",
  1514.        se_to In_Bedquilt,
  1515.        s_to In_Secret_N_S_Canyon_1,
  1516.        n_to At_Window_On_Pit_2;
  1517.  
  1518.  
  1519. Object In_Large_Low_Room "Large Low Room"
  1520.   with description
  1521.                "You are in a large low room.  Crawls lead \
  1522.                north, se, and sw.",
  1523.        sw_to In_Sloping_Corridor,
  1524.        se_to In_Oriental_Room,
  1525.        n_to Dead_End_Crawl;
  1526.  
  1527. Object Dead_End_Crawl "Dead End Crawl"
  1528.   with description
  1529.                "This is a dead end crawl.",
  1530.        s_to In_Large_Low_Room,
  1531.        out_to In_Large_Low_Room;
  1532.  
  1533.  
  1534. Object In_Secret_E_W_Canyon "Secret E/W Canyon Above Tight Canyon"
  1535.   with description
  1536.                "You are in a secret canyon which here runs E/W.  \
  1537.                It crosses over a very tight canyon 15 feet below.  \
  1538.                If you go down you may not be able to get back up.",
  1539.        e_to In_Hall_Of_Mt_King,
  1540.        w_to In_Secret_Canyon,
  1541.        before
  1542.        [; Go: if (noun==w_obj) canyon_from=self;
  1543.        ],
  1544.        d_to In_N_S_Canyon;
  1545.  
  1546. Object In_N_S_Canyon "N/S Canyon"
  1547.   with description
  1548.                "You are at a wide place in a very tight N/S \
  1549.                canyon.",
  1550.        s_to Canyon_Dead_End,
  1551.        n_to In_Tall_E_W_Canyon;
  1552.  
  1553. Object Canyon_Dead_End "Canyon Dead End"
  1554.   with description
  1555.                "The canyon here becomes too tight to go further \
  1556.                south.",
  1557.        n_to In_N_S_Canyon;
  1558.  
  1559. Object In_Tall_E_W_Canyon "In Tall E/W Canyon"
  1560.   with description
  1561.                "You are in a tall E/W canyon.  A low tight \
  1562.                crawl goes 3 feet north and seems to open up.",
  1563.        e_to In_N_S_Canyon,
  1564.        w_to Dead_End_8,
  1565.        n_to In_Swiss_Cheese_Room;
  1566.  
  1567. Object Atop_Stalactite "Atop Stalactite"
  1568.   with description
  1569.                "A large stalactite extends from the roof and \
  1570.                almost reaches the floor below.  You could climb down \
  1571.                it, and jump from it to the floor, but having done so \
  1572.                you would be unable to reach it to climb back up.",
  1573.        n_to In_Secret_N_S_Canyon_1,
  1574.        d_to
  1575.        [; if (random(100) <= 40) return Alike_Maze_6;
  1576.           if (random(100) <= 50) return Alike_Maze_9;
  1577.           return Alike_Maze_4;
  1578.        ],
  1579.        before
  1580.        [; Jump, Climb: <<Go d_obj>>;
  1581.        ];
  1582.  
  1583.  
  1584. Nearby Stalactite "stalactite"
  1585.   with description
  1586.                "You could probably climb down it, but you can forget \
  1587.                coming back up.",
  1588.        name "stalactite" "stalagmite" "stalagtite" "large",
  1589.        before
  1590.        [; LookUnder, Push, Take: "Do get a grip on yourself.";
  1591.        ],
  1592.   has  scenery;
  1593.  
  1594. ! ----------------------------------------------------------------------------
  1595. !   Here be dragons
  1596. ! ----------------------------------------------------------------------------
  1597.  
  1598. Object In_Secret_Canyon "Secret Canyon"
  1599.   with description
  1600.                "You are in a secret canyon which exits to the \
  1601.                north and east.",
  1602.        e_to 
  1603.        [; if (canyon_from == In_Secret_E_W_Canyon) return canyon_from;
  1604.           if (Dragon in location)
  1605.               "The dragon looks rather nasty.  You'd best not try to get by.";
  1606.           return In_Secret_E_W_Canyon;
  1607.        ],
  1608.        n_to
  1609.        [; if (canyon_from == In_Secret_N_S_Canyon_0) return canyon_from;
  1610.           if (Dragon in location)
  1611.               "The dragon looks rather nasty.  You'd best not try to get by.";
  1612.           return In_Secret_N_S_Canyon_0;
  1613.        ],
  1614.        out_to
  1615.        [; return canyon_from;
  1616.        ],
  1617.        before
  1618.        [; Yes: if (Dragon has general)
  1619.                {   remove Dragon; move DragonCorpse to location;
  1620.                    give Dragon ~general;
  1621.                    "Congratulations!  You have just vanquished a \
  1622.                     dragon with your bare hands!  (Unbelievable, \
  1623.                     isn't it?)";
  1624.                }
  1625.           No:  if (Dragon has general)
  1626.                {   give Dragon ~general;
  1627.                    "I should think not.";
  1628.                }
  1629.           give Dragon ~general;
  1630.        ];
  1631.  
  1632. Nearby Dragon "dragon"
  1633.   with description "I wouldn't mess with it if I were you.",
  1634.        name "dragon" "monster" "beast" "lizard"
  1635.             "huge" "green" "fierce" "scaly" "giant" "ferocious",
  1636.        initial "A huge green fierce dragon bars the way!",
  1637.        life
  1638.        [; Attack:  give Dragon general; "With what?  Your bare hands?";
  1639.           Give:    "The dragon is implacable.";
  1640.           ThrowAt: if (noun~=axe)
  1641.                        "You'd probably be better off using your \
  1642.                        bare hands than that thing!";
  1643.                    move axe to location;
  1644.                    "The axe bounces harmlessly off the dragon's \
  1645.                     thick scales.";
  1646.        ],
  1647.   has  animate;
  1648.  
  1649. Nearby persian_rug "Persian rug"
  1650.  class Treasure
  1651.   with name "rug" "persian" "persian" "fine" "finest" "dragon's",
  1652.        depositpoints 14,
  1653.        before
  1654.        [; Take: if (Dragon in location)
  1655.                 "You'll need to get the dragon to move first!";
  1656.        ],
  1657.        describe
  1658.        [; if (Dragon in location)
  1659.              "The dragon is sprawled out on the Persian rug!";
  1660.           "The Persian rug is spread out on the floor here.";
  1661.        ];
  1662.  
  1663. Object DragonCorpse "dragon's body"
  1664.   with initial
  1665.                "The body of a huge green dead dragon is lying off to \
  1666.                one side.",
  1667.        name "dragon" "corpse" "dead" "dragon's" "body",
  1668.        before
  1669.        [; Attack: "You've already done enough damage!";
  1670.        ],
  1671.   has  static;
  1672.  
  1673. ! ----------------------------------------------------------------------------
  1674. !   And more of the Alike Maze
  1675. ! ----------------------------------------------------------------------------
  1676.  
  1677. Object Dead_End_8 "Dead End"
  1678.  class DeadEndRoom
  1679.   with description "The canyon runs into a mass of boulders -- dead end.",
  1680.        s_to In_Tall_E_W_Canyon,
  1681.        out_to In_Tall_E_W_Canyon;
  1682.  
  1683. Object Alike_Maze_11 "Maze"
  1684.  class MazeRoom
  1685.   with 
  1686.        n_to Alike_Maze_1,
  1687.        w_to Alike_Maze_11,
  1688.        s_to Alike_Maze_11,
  1689.        e_to Dead_End_9;
  1690.  
  1691. Object Dead_End_9 "Dead End"
  1692.  class DeadEndRoom
  1693.   with w_to Alike_Maze_11,
  1694.        out_to Alike_Maze_11;
  1695.  
  1696. Object Dead_End_10 "Dead End"
  1697.  class DeadEndRoom
  1698.   with 
  1699.        s_to Alike_Maze_3,
  1700.        out_to Alike_Maze_3;
  1701.  
  1702.  
  1703. Object Alike_Maze_12 "Maze"
  1704.  class MazeRoom
  1705.   with 
  1706.        s_to At_Brink_Of_Pit,
  1707.        e_to Alike_Maze_13,
  1708.        w_to Dead_End_11;
  1709.  
  1710. Object Alike_Maze_13 "Maze"
  1711.  class MazeRoom
  1712.   with 
  1713.        n_to At_Brink_Of_Pit,
  1714.        w_to Alike_Maze_12,
  1715.        nw_to Dead_End_13;
  1716.  
  1717. Object Dead_End_11 "Dead End"
  1718.  class DeadEndRoom
  1719.   with 
  1720.        e_to Alike_Maze_12,
  1721.        out_to Alike_Maze_12;
  1722.  
  1723. Object Dead_End_12 "Dead End"
  1724.  class DeadEndRoom
  1725.   with 
  1726.        u_to Alike_Maze_8,
  1727.        out_to Alike_Maze_8;
  1728.  
  1729. Object Alike_Maze_14 "Maze"
  1730.  class MazeRoom
  1731.   with 
  1732.        u_to Alike_Maze_4,
  1733.        d_to Alike_Maze_4;
  1734.  
  1735. Object Dead_End_13 "Dead End"
  1736.  class DeadEndRoom
  1737.   with se_to Alike_Maze_13,
  1738.        out_to Alike_Maze_13,
  1739.        description "This is the pirate's dead end.",
  1740.        initial
  1741.        [;
  1742.           StopDaemon(Pirate);
  1743.           if (treasure_chest in self && treasure_chest hasnt moved)
  1744.               "You've found the pirate's treasure chest!";
  1745.        ],
  1746.   has  nodwarf;
  1747.  
  1748. Nearby treasure_chest "treasure chest"
  1749.  class Treasure
  1750.   with depositpoints 12,
  1751.        description "It's the pirate's treasure chest, filled with \
  1752.                     riches of all kinds!",
  1753.        initial "The pirate's treasure chest is here!",
  1754.        name "chest" "box" "treasure" "riches" "pirate" "pirate's" "treasure";
  1755.  
  1756. ! ----------------------------------------------------------------------------
  1757. !   Above the beanstalk: the Giant Room and the Waterfall
  1758. ! ----------------------------------------------------------------------------
  1759.  
  1760. Object In_Narrow_Corridor "In Narrow Corridor"
  1761.   with description
  1762.                "You are in a long, narrow corridor stretching \
  1763.                out of sight to the west.  At the eastern end is a \
  1764.                hole through which you can see a profusion of \
  1765.                leaves.",
  1766.        d_to In_West_Pit,
  1767.        w_to In_Giant_Room,
  1768.        e_to In_West_Pit,
  1769.        before
  1770.        [; Jump: deadflag=1; "You fall and break your neck!";
  1771.        ];
  1772.  
  1773. Nearby Leaves "leaves"
  1774.   with description
  1775.                "The leaves appear to be attached to the beanstalk \
  1776.                you climbed to get here.", article "some",
  1777.        name "leaf" "leaves" "plant" "tree" "stalk" "beanstalk" "profusion"
  1778.   has  scenery;
  1779.  
  1780.  
  1781. Object At_Steep_Incline "Steep Incline Above Large Room"
  1782.   with description
  1783.                "You are at the top of a steep incline above a \
  1784.                large room.  You could climb down here, but you would \
  1785.                not be able to climb up.  There is a passage leading \
  1786.                back to the north.",
  1787.        n_to In_Cavern_With_Waterfall,
  1788.        d_to In_Large_Low_Room;
  1789.  
  1790. Object In_Giant_Room "Giant Room"
  1791.   with description
  1792.                "You are in the giant room.  The ceiling here is \
  1793.                too high up for your lamp to show it.  Cavernous \
  1794.                passages lead east, north, and south.  On the west \
  1795.                wall is scrawled the inscription, ~Fee fie foe foo~ \
  1796.                [sic].",
  1797.        s_to In_Narrow_Corridor,
  1798.        e_to At_Recent_Cave_In,
  1799.        n_to In_Immense_N_S_Passage;
  1800.  
  1801. Nearby Inscription "scrawled inscription"
  1802.   with description "It says, ~Fee fie foe foo [sic].~",
  1803.        name "inscription" "writing" "scrawl" "scrawled"
  1804.   has  scenery;
  1805.  
  1806. Nearby golden_eggs "nest of golden eggs"
  1807.  class Treasure
  1808.   with depositpoints 14,
  1809.        description "The nest is filled with beautiful golden eggs!",
  1810.        initial "There is a large nest here, full of golden eggs!",
  1811.        name "eggs" "egg" "nest" "golden" "beautiful";
  1812.  
  1813.  
  1814. Object At_Recent_Cave_In "Recent Cave-in"
  1815.   with description
  1816.                "The passage here is blocked by a recent \
  1817.                cave-in.",
  1818.        s_to In_Giant_Room;
  1819.  
  1820.  
  1821. Object In_Immense_N_S_Passage "Immense N/S Passage"
  1822.   with description "You are at one end of an immense north/south passage.",
  1823.        s_to In_Giant_Room,
  1824.        n_to 
  1825.        [; if (RustyDoor has locked) <<Open RustyDoor>>;
  1826.           if (RustyDoor hasnt open)
  1827.           { give RustyDoor open; print "(first wrenching the door open)^"; }
  1828.           return RustyDoor;
  1829.        ];
  1830.  
  1831. Nearby RustyDoor "rusty door"
  1832.   with description "It's just a big iron door.",
  1833.        name "door" "hinge" "hinges" "massive" "rusty" "iron",
  1834.        when_closed "The way north is barred by a massive, rusty, iron door.",
  1835.        when_open   "The way north leads through a massive, rusty, iron door.",
  1836.        door_to In_Cavern_With_Waterfall,
  1837.        door_dir n_to,
  1838.        before
  1839.        [; Open:  if (RustyDoor has locked)
  1840.                     "The hinges are quite thoroughly rusted now \
  1841.                                and won't budge.";
  1842.           Close: if (RustyDoor has open)
  1843.                     "With all the effort it took to get the door \
  1844.                                open, I wouldn't suggest closing it again.";
  1845.                  "No problem there -- it already is.";
  1846.           Oil:   if (bottle in player && oil_in_the_bottle in bottle)
  1847.                  {   remove oil_in_the_bottle;
  1848.                      give RustyDoor ~locked openable;
  1849.                      "The oil has freed up the hinges so that the \
  1850.                       door will now move, although it requires some \
  1851.                       effort.";
  1852.                  }
  1853.                  else
  1854.                      "You have nothing to oil it with.";
  1855.           Water: if (bottle in player && water_in_the_bottle in bottle)
  1856.                  {   remove water_in_the_bottle; give RustyDoor locked ~open;
  1857.                      "The hinges are quite thoroughly \
  1858.                       rusted now and won't budge.";
  1859.                  }
  1860.                  else
  1861.                      "You have nothing to water it with.";
  1862.        ],
  1863.        after
  1864.        [; Open: "The door heaves open with a shower of rust.";
  1865.        ],
  1866.   has  static door locked;
  1867.  
  1868.  
  1869.  
  1870. Object In_Cavern_With_Waterfall "In Cavern With Waterfall" nothing
  1871.   with description
  1872.                "You are in a magnificent cavern with a rushing \
  1873.                stream, which cascades over a sparkling waterfall \
  1874.                into a roaring whirlpool which disappears through a \
  1875.                hole in the floor.  Passages exit to the south and \
  1876.                west.",
  1877.        s_to In_Immense_N_S_Passage,
  1878.        w_to At_Steep_Incline;
  1879.  
  1880. Nearby Waterfall "waterfall"
  1881.   with description "Wouldn't want to go down in in a barrel!",
  1882.        name "waterfall" "whirlpool" "sparkling" "whirling"
  1883.   has  scenery;
  1884.  
  1885. Nearby trident "jeweled trident"
  1886.  class Treasure
  1887.   with description "The trident is covered with fabulous jewels!",
  1888.        initial "There is a jewel-encrusted trident here!",
  1889.        name "trident" "jeweled" "jewel-encrusted" "encrusted" "fabulous",
  1890.        depositpoints 14;
  1891.  
  1892. ! ----------------------------------------------------------------------------
  1893. !   The caves around Bedquilt
  1894. ! ----------------------------------------------------------------------------
  1895.  
  1896. Object In_Soft_Room "In Soft Room"
  1897.   with description
  1898.                "You are in the soft room.  The walls are \
  1899.                covered with heavy curtains, the floor with a thick \
  1900.                pile carpet.  Moss covers the ceiling.",
  1901.        w_to In_Swiss_Cheese_Room;
  1902.  
  1903. Nearby Carpet "carpet"
  1904.   with description "The carpet is quite plush.",
  1905.        name "carpet" "shag" "pile" "heavy" "thick"
  1906.   has  scenery;
  1907.  
  1908. Nearby Curtains "curtains"
  1909.   with description "They seem to absorb sound very well.",
  1910.        name "curtain" "curtains" "heavy" "thick",
  1911.        before
  1912.        [; Take: "Now don't go ripping up the place!";
  1913.           LookUnder, Search:
  1914.             "You don't find anything exciting behind the curtains.";
  1915.        ],
  1916.   has  scenery;
  1917.  
  1918. Nearby Moss "moss"
  1919.   with description "It just looks like your typical, everyday moss.",
  1920.        name "moss" "typical" "everyday",
  1921.        before
  1922.        [; Take: "It crumbles to nothing in your hands.";
  1923.           Eat: "Eeeewwwww.";
  1924.        ],
  1925.   has  scenery;
  1926.  
  1927. Nearby velvet_pillow "velvet pillow" 
  1928.   with description "It's just a small velvet pillow.",
  1929.        initial "A small velvet pillow lies on the floor.",
  1930.        name "pillow" "velvet" "small";
  1931.  
  1932.  
  1933. Object In_Oriental_Room "Oriental Room"
  1934.   with description
  1935.                "This is the oriental room.  Ancient oriental \
  1936.                cave drawings cover the walls.  A gently sloping \
  1937.                passage leads upward to the north, another passage \
  1938.                leads se, and a hands and knees crawl leads west.",
  1939.        w_to In_Large_Low_Room,
  1940.        se_to In_Swiss_Cheese_Room,
  1941.        u_to In_Misty_Cavern,
  1942.        n_to In_Misty_Cavern;
  1943.  
  1944. Nearby CaveDrawings "ancient oriental drawings"
  1945.   with description "They seem to depict people and animals.",
  1946.        name "paintings" "drawings" "art" "cave" "ancient" "oriental"
  1947.   has  scenery;
  1948.  
  1949. Nearby ming_vase "ming vase"
  1950.  class Treasure
  1951.   with description "It's a delicate, previous, ming vase!",
  1952.        name "vase" "ming" "delicate",
  1953.        depositpoints 14,
  1954.        after
  1955.        [; Drop: if (velvet_pillow in location)
  1956.                 {   print "(coming to rest, delicately, on the velvet pillow)^";
  1957.                     rfalse;
  1958.                 }
  1959.                 remove ming_vase; move shards to location;
  1960.                 "The ming vase drops with a delicate crash.";
  1961.           Attack: remove ming_vase; move shards to location;
  1962.                 "You have taken the vase and \
  1963.                  hurled it delicately to the ground.";
  1964.           Receive: "The vase is too fragile to use as a container.";
  1965.        ];
  1966.  
  1967.  
  1968. Object shards "some worthless shards of pottery"
  1969.   with initial "The floor is littered with worthless shards of pottery.",
  1970.        description "They look to be the remains of what was once a \
  1971.                     beautiful vase.  I guess some oaf must have dropped it.",
  1972.        name "pottery" "shards" "remains" "vase" "worthless";
  1973.  
  1974.  
  1975. Object In_Misty_Cavern "Misty Cavern"
  1976.   with description
  1977.                "You are following a wide path around the outer \
  1978.                edge of a large cavern. Far below, through a heavy \
  1979.                white mist, strange splashing noises can be heard.  \
  1980.                The mist rises up through a fissure in the ceiling.  \
  1981.                The path exits to the south and west.",
  1982.        s_to In_Oriental_Room,
  1983.        w_to In_Alcove;
  1984.  
  1985. Nearby CeilingFissure "fissure"
  1986.   with description "You can't really get close enough to examine it.",
  1987.        name "fissure" "ceiling"
  1988.   has  scenery;
  1989.  
  1990. ! ----------------------------------------------------------------------------
  1991. !   Plovers and pyramids
  1992. ! ----------------------------------------------------------------------------
  1993.  
  1994. Object In_Alcove "Alcove"
  1995.   with description
  1996.                "You are in an alcove.  A small northwest path seems \
  1997.                to widen after a short distance.  An extremely tight \
  1998.                tunnel leads east.  It looks like a very tight \
  1999.                squeeze.  An eerie light can be seen at the other \
  2000.                end.",
  2001.        nw_to In_Misty_Cavern,
  2002.        e_to
  2003.        [ j; j=children(player);
  2004.          if (j==0 || (j==1 && egg_sized_emerald in player))
  2005.              return In_Plover_Room;
  2006.          "Something you're carrying won't fit through the \
  2007.           tunnel with you. You'd best take inventory and drop \
  2008.           something.";
  2009.        ];
  2010.  
  2011.  
  2012. Object In_Plover_Room "Plover Room"
  2013.   with description
  2014.                "You're in a small chamber lit by an eerie green \
  2015.                light.  An extremely narrow tunnel exits to the west. \
  2016.                A dark corridor leads northeast.",
  2017.        out_to In_Alcove,
  2018.        ne_to In_Dark_Room,
  2019.        w_to
  2020.        [ j; j=children(player);
  2021.          if (j==0 || (j==1 && egg_sized_emerald in player))
  2022.              return In_Alcove;
  2023.          "Something you're carrying won't fit through the \
  2024.           tunnel with you. You'd best take inventory and drop \
  2025.           something.";
  2026.        ],
  2027.        before
  2028.        [; Plover: if (egg_sized_emerald in player)
  2029.                   move egg_sized_emerald to In_Plover_Room;
  2030.                   PlayerTo(At_Y2); rtrue;
  2031.        ],
  2032.   has  light;
  2033.  
  2034. Nearby egg_sized_emerald "emerald the size of a plover's egg"
  2035.  class Treasure
  2036.   with depositpoints 14, article "an",
  2037.        description "Plover's eggs, by the way, are quite large.",
  2038.        initial "There is an emerald here the size of a plover's egg!",
  2039.        name "emerald" "egg-sized" "egg" "sized" "plover's";
  2040.  
  2041.  
  2042. Object In_Dark_Room "The Dark Room"
  2043.   with description
  2044.                "You're in the dark-room.  A corridor leading \
  2045.                south is the only exit.",
  2046.        s_to In_Plover_Room
  2047.   has  nodwarf;
  2048.  
  2049. Nearby StoneTablet "stone tablet"
  2050.   with initial
  2051.                "A massive stone tablet imbedded in the wall reads: \
  2052.                ~Congratulations on bringing light into the \
  2053.                dark-room!~",
  2054.        name "tablet" "massive" "stone"
  2055.   has  static;
  2056.  
  2057. Nearby platinum_pyramid "platinum pyramid"
  2058.  class Treasure
  2059.   with initial "There is a platinum pyramid here, 8 inches on a side!",
  2060.        depositpoints 14,
  2061.        description "The platinum pyramid is 8 inches on a side!",
  2062.        name "platinum" "pyramid" "platinum" "pyramidal";
  2063.  
  2064. ! ----------------------------------------------------------------------------
  2065. !   North of the complex junction: a long up-down corridor
  2066. ! ----------------------------------------------------------------------------
  2067.  
  2068. Object In_Arched_Hall "Arched Hall"
  2069.   with description
  2070.                "You are in an arched hall.  A coral passage \
  2071.                once continued up and east from here, but is now \
  2072.                blocked by debris.  The air smells of sea water.",
  2073.        d_to In_Shell_Room;
  2074.  
  2075. Object In_Shell_Room "Shell Room"
  2076.   with description
  2077.                "You're in a large room carved out of \
  2078.                sedimentary rock.  The floor and walls are littered \
  2079.                with bits of shells imbedded in the stone.  A shallow \
  2080.                passage proceeds downward, and a somewhat steeper one \
  2081.                leads up.  A low hands and knees passage enters from \
  2082.                the south.",
  2083.        u_to In_Arched_Hall,
  2084.        d_to In_Ragged_Corridor,
  2085.        s_to
  2086.        [; if (giant_bivalve in player)
  2087.           {   if (giant_bivalve has open)
  2088.                   "You can't fit this five-foot oyster \
  2089.                    through that little passage!";
  2090.               else
  2091.                   "You can't fit this five-foot clam \
  2092.                    through that little passage!";
  2093.           }
  2094.           return At_Complex_Junction;
  2095.        ];
  2096.  
  2097.  
  2098. Nearby giant_bivalve "giant clam"
  2099.   with name "giant" "clam" "oyster" "bivalve",
  2100.        describe
  2101.        [; if (self has general)
  2102.               "There is an enormous oyster here with its shell tightly closed.";
  2103.           "There is an enormous clam here with its shell tightly closed.";
  2104.        ],
  2105.        before
  2106.        [; Examine: if (location==At_Ne_End or At_Sw_End)
  2107.                 "Interesting.  There seems to be something written on the \
  2108.                 underside of the oyster:^^\
  2109.                 ~There is something strange about this \
  2110.                 place, such that one of the words I've always known \
  2111.                 now has a new effect.~";
  2112.                 "A giant bivalve of some kind.";
  2113.           Open:
  2114.                     "You aren't strong enough to open the clam \
  2115.                      with your bare hands.";
  2116.           Unlock:
  2117.                 if (second~=trident)
  2118.                 {  CDefArt(trident); " isn't strong enough to open the clam."; }
  2119.                 if (self has general)
  2120.                     "The oyster creaks open, revealing nothing \
  2121.                     but oyster inside.  It promptly snaps shut \
  2122.                     again.";  
  2123.                 give self general; move pearl to In_A_Cul_De_Sac;
  2124.                 "A glistening pearl falls out of the clam and \
  2125.                  rolls away.  Goodness, this must really be an \
  2126.                  oyster.  (I never was very good at \
  2127.                  identifying bivalves.)  Whatever it is, it \
  2128.                  has now snapped shut again.";
  2129.           Attack:
  2130.                 "The shell is very strong and is impervious to attack.";
  2131.        ];
  2132.  
  2133. Object pearl "glistening pearl"
  2134.  class Treasure
  2135.   with description "It's incredibly large!",
  2136.        initial "Off to one side lies a glistening pearl!",
  2137.        name "pearl" "glistening" "incredible" "incredibly" "large",
  2138.        depositpoints 14;
  2139.  
  2140.  
  2141. Object In_Ragged_Corridor "Ragged Corridor"
  2142.   with description
  2143.                "You are in a long sloping corridor with ragged \
  2144.                sharp walls.",
  2145.        u_to In_Shell_Room,
  2146.        d_to In_A_Cul_De_Sac;
  2147.  
  2148. Object In_A_Cul_De_Sac "Cul-de-Sac"
  2149.   with description
  2150.                "You are in a cul-de-sac about eight feet \
  2151.                across.",
  2152.        u_to In_Ragged_Corridor,
  2153.        out_to In_Ragged_Corridor;
  2154.  
  2155. ! ----------------------------------------------------------------------------
  2156. !   Witt's End: Cave under construction
  2157. ! ----------------------------------------------------------------------------
  2158.  
  2159. Object In_Anteroom "In Anteroom"
  2160.   with description
  2161.                "You are in an anteroom leading to a large \
  2162.                passage to the east.  Small passages go west and up.  \
  2163.                The remnants of recent digging are evident.",
  2164.        u_to At_Complex_Junction,
  2165.        w_to In_Bedquilt,
  2166.        e_to At_Witts_End;
  2167.  
  2168. Nearby WittSign "sign"
  2169.   with initial
  2170.               "A sign in midair here says ~Cave under \
  2171.                construction beyond this point. Proceed at own risk.  \
  2172.                [Witt Construction Company]~",
  2173.        name "sign" "witt" "company" "construction",
  2174.        before [; Take: "It's hanging way above your head."; ],
  2175.   has  static;
  2176.  
  2177. Nearby spelunker_today "recent issues of ~Spelunker Today~"
  2178.   with name "magazines" "magazine" "issue" "issues" "spelunker" "today",
  2179.        initial
  2180.            "There are a few recent issues of ~Spelunker Today~ magazine here.",
  2181.        description "I'm afraid the magazines are written in Dwarvish.",
  2182.        article "a few",
  2183.        after
  2184.        [; Take: if (location==At_Witts_End) score=score-1;
  2185.           Drop: if (location==At_Witts_End)
  2186.                 {   score=score+1;
  2187.                     "You really are at wit's end.";
  2188.                 }
  2189.        ];
  2190.  
  2191. Object At_Witts_End "At Witt's End"
  2192.   with description
  2193.                "You are at Witt's End.  Passages lead off in \
  2194.                *all* directions.",
  2195.        w_to   "You have crawled around in some little holes and \
  2196.                found your way blocked by a recent cave-in.  You are \
  2197.                now back in the main passage.",
  2198.        before
  2199.        [; Go: if (noun~=w_obj && random(100)<=95)
  2200.                  "You have crawled around in some little holes and \
  2201.                   wound up back in the main passage.";
  2202.               PlayerTo(In_Anteroom); rtrue;
  2203.        ];
  2204.  
  2205. ! ----------------------------------------------------------------------------
  2206. !   North of the secret canyons, on the other side of the pit
  2207. ! ----------------------------------------------------------------------------
  2208.  
  2209. Object In_Mirror_Canyon "In Mirror Canyon"
  2210.   with description
  2211.                "You are in a north/south canyon about 25 feet \
  2212.                across.  The floor is covered by white mist seeping \
  2213.                in from the north.  The walls extend upward for well \
  2214.                over 100 feet.  Suspended from some unseen point far \
  2215.                above you, an enormous two-sided mirror is hanging \
  2216.                parallel to and midway between the canyon walls.^^\
  2217.                A small window can be seen in either wall, \
  2218.                some fifty feet up.",
  2219.        s_to In_Secret_N_S_Canyon_0,
  2220.        n_to At_Reservoir;
  2221.  
  2222. Nearby CanyonMirror "suspended mirror"
  2223.   with description
  2224.                "The mirror is obviously provided for the use of the 
  2225.                dwarves who, as you know, are extremely vain.",
  2226.        name "mirror" "massive" "enormous" "hanging" "suspended"
  2227.             "dwarves'" "two-sided" "two" "sided",
  2228.        initial "The mirror is obviously provided for the use of the \
  2229.                 dwarves, who as you know, are extremely vain.",
  2230.        before [; Attack, Remove: "You can't reach it from here."; ],
  2231.   has  static;
  2232.  
  2233.  
  2234. Object At_Window_On_Pit_2 "At Window on Pit"
  2235.   with description
  2236.                "You're at a low window overlooking a huge pit, \
  2237.                which extends up out of sight.  A floor is \
  2238.                indistinctly visible over 50 feet below.  Traces of \
  2239.                white mist cover the floor of the pit, becoming \
  2240.                thicker to the left. Marks in the dust around the \
  2241.                window would seem to indicate that someone has been \
  2242.                here recently.  Directly across the pit from you and \
  2243.                25 feet away there is a similar window looking into a \
  2244.                lighted room.  A shadowy figure can be seen there \
  2245.                peering back at you.",
  2246.        cant_go "The only passage is back west to the junction.",
  2247.        w_to At_Junction_Of_Three,
  2248.        before
  2249.        [; Jump: deadflag=1; "You jump and break your neck!";
  2250.           WaveHands: "The shadowy figure waves back at you!";
  2251.        ];
  2252.  
  2253. Object At_Reservoir "At Reservoir"
  2254.   with description
  2255.                "You are at the edge of a large underground \
  2256.                reservoir.  An opaque cloud of white mist fills the \
  2257.                room and rises rapidly upward.  The lake is fed by a \
  2258.                stream, which tumbles out of a hole in the wall about \
  2259.                10 feet overhead and splashes noisily into the water \
  2260.                somewhere within the mist.  The only passage goes \
  2261.                back toward the south.",
  2262.        s_to In_Mirror_Canyon,
  2263.        out_to In_Mirror_Canyon,
  2264.        before
  2265.        [; Swim: "The water is icy cold, and you would soon freeze to death.";
  2266.        ];
  2267.  
  2268. ! ----------------------------------------------------------------------------
  2269. !   The Chasm and the Troll Bridge
  2270. ! ----------------------------------------------------------------------------
  2271.  
  2272. Object In_Sloping_Corridor "Sloping Corridor"
  2273.   with description
  2274.                "You are in a long winding corridor sloping out \
  2275.                of sight in both directions.",
  2276.        d_to In_Large_Low_Room,
  2277.        u_to On_Sw_Side_Of_Chasm,
  2278.        cant_go "The corridor slopes steeply up and down.";
  2279.  
  2280. Object On_Sw_Side_Of_Chasm "On SW Side of Chasm"
  2281.   with description
  2282.                "You are on one side of a large, deep chasm.  A \
  2283.                heavy white mist rising up from below obscures all \
  2284.                view of the far side.  A southwest path leads away \
  2285.                from the chasm into a winding corridor.",
  2286.        ne_to CrossRicketyBridge,
  2287.        sw_to In_Sloping_Corridor,
  2288.        d_to In_Sloping_Corridor,
  2289.        cant_go "The path winds southwest.",
  2290.        before
  2291.        [; Jump: if (RicketyBridge in self)
  2292.                     "I respectfully suggest you go across the \
  2293.                      bridge instead of jumping.";
  2294.               deadflag=1; "You didn't make it.";
  2295.        ];
  2296.  
  2297. [ CrossRicketyBridge;
  2298.   if (Troll has general || Troll in nothing)
  2299.   {
  2300.       give Troll ~general;
  2301.       if (Bear has general)
  2302.       {   remove Bear; remove self; give Wreckage ~absent;
  2303.           remove RicketyBridge; give RicketyBridge absent; StopDaemon(Bear);
  2304.           deadflag=1;
  2305.           "Just as you reach the other side, the bridge \
  2306.            buckles beneath the weight of the bear, which \
  2307.            was still following you around.  You scrabble \
  2308.            desperately for support, but as the bridge \
  2309.            collapses you stumble back and fall into the \
  2310.            chasm.";
  2311.       }
  2312.       return RicketyBridge;
  2313.   }
  2314.   if (Troll in location)
  2315.       "The troll refuses to let you cross.";
  2316.   move Troll to location;
  2317.   "The troll steps out from beneath the bridge and blocks your way.";
  2318. ];
  2319.  
  2320. Nearby RicketyBridge "rickety bridge"
  2321.   with description "It just looks like an ordinary, but unstable, bridge.",
  2322.        describe
  2323.        [; print "A rickety wooden bridge extends across the \
  2324.                  chasm, vanishing into the mist.^^\
  2325.                  A sign posted on the bridge reads, \
  2326.                  ~Stop! Pay troll!~^";
  2327.           if (Troll notin location)
  2328.                  "The troll is nowhere to be seen.";
  2329.           rtrue;
  2330.        ],
  2331.        name "bridge" "rickety" "unstable" "wobbly" "rope",
  2332.        door_dir
  2333.        [; if (location==On_Sw_Side_Of_Chasm) return ne_to; return sw_to;
  2334.        ],
  2335.        door_to
  2336.        [; if (location==On_Sw_Side_Of_Chasm) return On_Ne_Side_Of_Chasm;
  2337.           return On_Sw_Side_Of_Chasm;
  2338.        ],
  2339.        found_in  On_Sw_Side_Of_Chasm  On_Ne_Side_Of_Chasm
  2340.   has  static door open;
  2341.  
  2342. Object Wreckage "wreckage of bridge"
  2343.   with initial "The wreckage of the troll bridge (and a dead bear) \
  2344.                 can be seen at the bottom of the chasm.",
  2345.        name "wreckage" "wreck" "bridge" "dead" "bear",
  2346.        before
  2347.        [; "The wreckage is too far below.";
  2348.        ],
  2349.        found_in  On_Sw_Side_Of_Chasm  On_Ne_Side_Of_Chasm
  2350.   has  static absent;
  2351.  
  2352.  
  2353. Object Troll "burly troll" RicketyBridge
  2354.   with description
  2355.                "Trolls are close relatives with rocks and have skin \
  2356.                 as tough as that of a rhinoceros.",
  2357.        initial "A burly troll stands by the bridge and insists you \
  2358.                 throw him a treasure before you may cross.",
  2359.        name "troll" "burly",
  2360.        life
  2361.        [; Attack: "The troll laughs aloud at your pitiful attempt \
  2362.                    to injure him.";
  2363.           ThrowAt, Give:
  2364.               if (noun has valuable)
  2365.               {   remove noun;
  2366.                   move Troll to RicketyBridge;
  2367.                   give Troll general; score=score-5;
  2368.                   "The troll catches your treasure and scurries \
  2369.                    away out of sight.";
  2370.               }
  2371.               if (noun==tasty_food)
  2372.                   "Gluttony is not one of the troll's vices. \
  2373.                    Avarice, however, is.";
  2374.               print "The troll deftly catches "; DefArt(noun);
  2375.               ", examines it carefully, and tosses it back, \
  2376.                declaring, ~Good workmanship, but it's not \
  2377.                valuable enough.~";
  2378.           Order: "You'll be lucky.";
  2379.           Answer, Ask: "Trolls make poor conversation.";
  2380.        ],
  2381.   has  animate;
  2382.  
  2383.  
  2384. Object On_Ne_Side_Of_Chasm "On NE Side of Chasm"
  2385.   with description
  2386.                "You are on the far side of the chasm.  A \
  2387.                northeast path leads away from the chasm on this \
  2388.                side.",
  2389.        sw_to CrossRicketyBridge,
  2390.        ne_to In_Corridor,
  2391.        before
  2392.        [; Jump: if (RicketyBridge in self)
  2393.                     "I respectfully suggest you go across the \
  2394.                      bridge instead of jumping.";
  2395.               deadflag=1; "You didn't make it.";
  2396.        ],
  2397.   has  nodwarf;
  2398.  
  2399. Object In_Corridor "In Corridor"
  2400.   with description
  2401.                "You're in a long east/west corridor.  A faint \
  2402.                rumbling noise can be heard in the distance.",
  2403.        w_to On_Ne_Side_Of_Chasm,
  2404.        e_to At_Fork_In_Path
  2405.   has  nodwarf;
  2406.  
  2407. ! ----------------------------------------------------------------------------
  2408. !   The Volcano
  2409. ! ----------------------------------------------------------------------------
  2410.  
  2411. Object At_Fork_In_Path "At Fork in Path"
  2412.   with description
  2413.                "The path forks here.  The left fork leads \
  2414.                northeast.  A dull rumbling seems to get louder in \
  2415.                that direction.  The right fork leads southeast down \
  2416.                a gentle slope.  The main corridor enters from the \
  2417.                west.",
  2418.        w_to In_Corridor,
  2419.        ne_to At_Junction_With_Warm_Walls,
  2420.        se_to In_Limestone_Passage,
  2421.        d_to In_Limestone_Passage
  2422.   has  nodwarf;
  2423.  
  2424. Object At_Junction_With_Warm_Walls "At Junction With Warm Walls"
  2425.   with description
  2426.                "The walls are quite warm here.  From the north \
  2427.                can be heard a steady roar, so loud that the entire \
  2428.                cave seems to be trembling.  Another passage leads \
  2429.                south, and a low crawl goes east.",
  2430.        s_to At_Fork_In_Path,
  2431.        n_to At_Breath_Taking_View,
  2432.        e_to In_Chamber_Of_Boulders
  2433.   has  nodwarf;
  2434.  
  2435.  
  2436. Object At_Breath_Taking_View "At Breath-Taking View"
  2437.   with description
  2438.                "You are on the edge of a breath-taking view. Far \
  2439.                below you is an active volcano, from which great \
  2440.                gouts of molten lava come surging out, cascading back \
  2441.                down into the depths.  The glowing rock fills the \
  2442.                farthest reaches of the cavern with a blood-red \
  2443.                glare, giving everything an eerie, macabre \
  2444.                appearance. The air is filled with flickering sparks \
  2445.                of ash and a heavy smell of brimstone.  The walls are \
  2446.                hot to the touch, and the thundering of the volcano \
  2447.                drowns out all other sounds.  Embedded in the jagged \
  2448.                roof far overhead are myriad twisted formations \
  2449.                composed of pure white alabaster, which scatter the \
  2450.                murky light into sinister apparitions upon the walls. \
  2451.                To one side is a deep gorge, filled with a bizarre \
  2452.                chaos of tortured rock which seems to have been \
  2453.                crafted by the devil himself.  An immense river of \
  2454.                fire crashes out from the depths of the volcano, \
  2455.                burns its way through the gorge, and plummets into a \
  2456.                bottomless pit far off to your left.  To the right, \
  2457.                an immense geyser of blistering steam erupts \
  2458.                continuously from a barren island in the center of a \
  2459.                sulfurous lake, which bubbles ominously.  The far \
  2460.                right wall is aflame with an incandescence of its \
  2461.                own, which lends an additional infernal splendor to \
  2462.                the already hellish scene.  A dark, forboding passage \
  2463.                exits to the south.",
  2464.        s_to At_Junction_With_Warm_Walls,
  2465.        out_to At_Junction_With_Warm_Walls,
  2466.        d_to "Don't be ridiculous!",
  2467.        before [; Jump: <<Go d_obj>>; ],
  2468.   has  light;
  2469.  
  2470.  
  2471. Nearby Volcano "active volcano"
  2472.   with description
  2473.                "Great gouts of molten lava come surging out of the \
  2474.                volvano and go cascading back down into the depths.  \
  2475.                The glowing rock fills the farthest reaches of the \
  2476.                cavern with a blood-red glare, giving everything an \
  2477.                eerie, macabre appearance.",
  2478.        name "volcano" "rock"
  2479.             "active" "glowing" "blood" "blood-red" "red" "eerie" "macabre"
  2480.   has  scenery;
  2481.  
  2482.  
  2483. Nearby Sparks "sparks of ash"
  2484.   with description "The sparks too far away for you to get a good look at \
  2485.                     them.",
  2486.        name "spark" "sparks" "ash" "air" "flickering"
  2487.   has  scenery;
  2488.  
  2489.  
  2490. Nearby JaggedRoof "jagged roof"
  2491.   with description
  2492.                "Embedded in the jagged roof far overhead are myriad \
  2493.                twisted formations composed of pure white alabaster, \
  2494.                which scatter the murky light into sinister \
  2495.                apparitions upon the walls.",
  2496.        name "roof" "formations" "light" "apparaitions"
  2497.             "jagged" "twsited" "murky" "sinister"
  2498.   has  scenery;
  2499.  
  2500. Nearby DeepGorge "deep gorge"
  2501.   with description
  2502.                "The gorge is filled with a bizarre chaos of tortured \
  2503.                rock which seems to have been crafted by the devil \
  2504.                himself.",
  2505.        name "gorge" "chaos" "rock" "deep" "bizarre" "tortured"
  2506.   has  scenery;
  2507.  
  2508. Nearby RiverOfFire "river of fire"
  2509.   with description
  2510.                "The river of fire crashes out from the depths of the \
  2511.                volcano, burns its way through the gorge, and \
  2512.                plummets into a bottomless pit far off to your \
  2513.                left.",
  2514.        name "river" "fire" "depth" "pit" "fire" "fiery" "bottomless"
  2515.   has  scenery;
  2516.  
  2517. Nearby Geyser "immense geyser"
  2518.   with description
  2519.                "The geyser of blistering steam erupts continuously \
  2520.                from a barren island in the center of a sulfurous \
  2521.                lake, which bubbles ominously.",
  2522.        name "geyser" "steam" "island" "lake"
  2523.             "immense" "blistering" "barren" "sulfrous"
  2524.             "sulferous" "sulpherous" "sulphrous" "bubbling"
  2525.   has  scenery;
  2526.  
  2527.  
  2528. Object In_Chamber_Of_Boulders "In Chamber of Boulders"
  2529.   with description
  2530.                "You are in a small chamber filled with large \
  2531.                boulders.  The walls are very warm, causing the air \
  2532.                in the room to be almost stifling from the heat.  The \
  2533.                only exit is a crawl heading west, through which is \
  2534.                coming a low rumbling.",
  2535.        w_to At_Junction_With_Warm_Walls,
  2536.        out_to At_Junction_With_Warm_Walls
  2537.   has  nodwarf;
  2538.  
  2539.  
  2540. Nearby ChamberBoulders "boulders"
  2541.   with description "They're just ordinary boulders.  They're warm.",
  2542.        name "boulder" "boulders" "rocks" "stones"
  2543.   has  scenery;
  2544.  
  2545. Nearby rare_spices "rare spices"
  2546.  class Treasure
  2547.   with name "spices" "spice" "rare" "exotic",
  2548.        depositpoints 14, article "a selection of",
  2549.        before
  2550.        [; Smell, Examine: "They smell wonderfully exotic!";
  2551.        ];
  2552.  
  2553. Object In_Limestone_Passage "In Limestone Passage"
  2554.   with description
  2555.                "You are walking along a gently sloping \
  2556.                north/south passage lined with oddly shaped limestone \
  2557.                formations.",
  2558.        n_to At_Fork_In_Path,
  2559.        u_to At_Fork_In_Path,
  2560.        s_to In_Front_Of_Barren_Room,
  2561.        d_to In_Front_Of_Barren_Room
  2562.   has  nodwarf;
  2563.  
  2564. Nearby LimestoneFormations "limestone formations"
  2565.   with description
  2566.                "Every now and then a particularly strange shape \
  2567.                catches your eye.",
  2568.        name "formations" "shape" "shapes"
  2569.             "lime" "limestone" "stone" "oddly" "shaped"
  2570.             "oddly-shaped"
  2571.   has  scenery;
  2572.  
  2573. ! ----------------------------------------------------------------------------
  2574. !   If you go down to the woods today...
  2575. ! ----------------------------------------------------------------------------
  2576.  
  2577. Object In_Front_Of_Barren_Room "In Front of Barren Room"
  2578.   with description
  2579.                "You are standing at the entrance to a large, \
  2580.                barren room.  A sign posted above the entrance reads: \
  2581.                ~Caution!  Bear in room!~",
  2582.        w_to In_Limestone_Passage,
  2583.        u_to In_Limestone_Passage,
  2584.        e_to In_Barren_Room,
  2585.        in_to In_Barren_Room
  2586.   has  nodwarf;
  2587.  
  2588.  
  2589. Nearby BarrenSign "caution sign"
  2590.   with description "The sign reads, ~Caution!  Bear in room!~",
  2591.        name "sign" "barren" "room" "caution"
  2592.   has  scenery;
  2593.  
  2594.  
  2595. Object In_Barren_Room "In Barren Room"
  2596.   with description
  2597.                "You are inside a barren room.  The center of \
  2598.                the room is completely empty except for some dust.  \
  2599.                Marks in the dust lead away toward the far end of the \
  2600.                room.  The only exit is the way you came in.",
  2601.        w_to In_Front_Of_Barren_Room,
  2602.        out_to In_Front_Of_Barren_Room
  2603.   has  nodwarf;
  2604.  
  2605.  
  2606. Nearby Dust "dust"
  2607.   with description "It just looks like ordinary dust.",
  2608.        name "dust" "marks"
  2609.   has  scenery;
  2610.  
  2611. Nearby Bear "large cave bear"
  2612.   with describe
  2613.        [; if (Bear has general) "You are being followed by a very \
  2614.                                  large, tame bear.";
  2615.           if (Bear hasnt scored)
  2616.                                 "There is a ferocious cave bear \
  2617.                                  eyeing you from the far end of the room!";
  2618.           if (location==In_Barren_Room)
  2619.                                 "There is a gentle cave bear \
  2620.                                  sitting placidly in one corner.";
  2621.           "There is a contented-looking \
  2622.            bear wandering about nearby.";
  2623.        ],
  2624.        name "bear" "large" "tame" "ferocious" "cave",
  2625.        life
  2626.        [; Attack: if (axe in player) <<ThrowAt axe Bear>>
  2627.               if (Bear has scored)
  2628.                   "The bear is confused; he only wants to be your friend.";
  2629.               "With what?  Your bare hands?  Against *his* bear hands??";
  2630.           ThrowAt: 
  2631.               if (noun~=axe) <<Give noun Bear>>;
  2632.               if (Bear has scored)
  2633.                   "The bear is confused; he only wants to be your friend.";
  2634.               move axe to location; give axe general;
  2635.               "The axe misses and lands near the bear \
  2636.                where you can't get at it.";
  2637.           Give:
  2638.               if (noun==tasty_food)
  2639.               {   give axe ~general; remove tasty_food; give Bear scored;
  2640.                   "The bear eagerly wolfs down your food, after \
  2641.                    which he seems to calm down considerably and \
  2642.                    even becomes rather friendly.";
  2643.               }
  2644.               if (Bear has scored)
  2645.                   "The bear doesn't seem very interested in your offer.";
  2646.               "Uh-oh -- your offer only makes the bear angrier!";
  2647.           Order, Ask, Answer: "This is a Bear of very little brain.";
  2648.        ],
  2649.        before
  2650.        [; Examine:
  2651.               print "The bear is extremely large, ";
  2652.               if (Bear has scored) "but appears to be friendly.";
  2653.               "and seems quite ferocious!";
  2654.           Take, Catch: if (Bear hasnt scored) "Surely you're joking!";
  2655.               if (golden_chain has locked)
  2656.                   "The bear is still chained to the wall.";
  2657.               give Bear general; StartDaemon(Bear);
  2658.               "Ok, the bear's now following you around.";
  2659.           Drop, Release: if (Bear hasnt general) "What?";
  2660.               give Bear ~general; StopDaemon(Bear);
  2661.               if (Troll in location)
  2662.               {   remove Troll;
  2663.                   "The bear lumbers toward the troll, who lets \
  2664.                    out a startled shriek and scurries away.  The \
  2665.                    bear soon gives up the pursuit and wanders \
  2666.                    back.";
  2667.               }
  2668.               "The bear wanders away from you.";
  2669.        ],
  2670.        time_left 0,
  2671.        daemon
  2672.        [; if (location==thedark) rfalse;
  2673.           if (location==parent(Bear))
  2674.           {   if (location==At_Breath_Taking_View)
  2675.                   "^The bear roars with delight.";
  2676.               rfalse;
  2677.           }
  2678.           move Bear to location;
  2679.           "^The bear lumbers along behind you.";
  2680.        ],
  2681.   has  animate;
  2682.  
  2683. Nearby golden_chain "golden chain"
  2684.  class Treasure
  2685.   with depositpoints 14,
  2686.        describe
  2687.        [; if (self has locked) "The bear is held back by a solid gold chain.";
  2688.           "A solid golden chain lies in coils on the ground!";
  2689.        ],
  2690.        description "The chain has thick links of solid gold!",
  2691.        name "chain" "links" "shackles" "solid"
  2692.             "gold" "golden" "thick" "chains",
  2693.        with_key set_of_keys,
  2694.        before
  2695.        [; Take: if (self has locked)
  2696.           {   if (Bear has scored) "It's locked to the friendly bear.";
  2697.               "It's locked to the ferocious bear!";
  2698.           }
  2699.           Unlock: if (Bear hasnt scored)
  2700.                       "There is no way to get past the bear to \
  2701.                        unlock the chain, which is probably just as \
  2702.                        well.";
  2703.           Lock: "The mechanism won't lock again.";
  2704.        ],
  2705.        after
  2706.        [; Unlock: "You unlock the chain, and set the tame bear free.";
  2707.        ],
  2708.   has  lockable locked;
  2709.  
  2710. ! ----------------------------------------------------------------------------
  2711. !   The Different Maze
  2712. ! ----------------------------------------------------------------------------
  2713.  
  2714. Class  DiffMaze
  2715.   with description "You are in a maze of twisty little passages, \
  2716.            all different.";
  2717.  
  2718. Object Different_Maze_1 "Maze"
  2719.  class DiffMaze
  2720.   with s_to  Different_Maze_3,
  2721.        sw_to Different_Maze_4,
  2722.        ne_to Different_Maze_5,
  2723.        se_to Different_Maze_6,
  2724.        u_to  Different_Maze_7,
  2725.        nw_to Different_Maze_8,
  2726.        e_to  Different_Maze_9,
  2727.        w_to  Different_Maze_10,
  2728.        n_to  Different_Maze_11,
  2729.        d_to  At_West_End_Of_Long_Hall;
  2730.  
  2731.  
  2732. Object Different_Maze_2 "Maze"
  2733.  class DiffMaze
  2734.   with
  2735.        sw_to Different_Maze_3,
  2736.        n_to Different_Maze_4,
  2737.        e_to Different_Maze_5,
  2738.        nw_to Different_Maze_6,
  2739.        se_to Different_Maze_7,
  2740.        ne_to Different_Maze_8,
  2741.        w_to Different_Maze_9,
  2742.        d_to Different_Maze_10,
  2743.        u_to Different_Maze_11,
  2744.        s_to Dead_End_14;
  2745.  
  2746. Object Different_Maze_3 "Maze"
  2747.  class DiffMaze
  2748.   with
  2749.        w_to Different_Maze_1,
  2750.        se_to Different_Maze_4,
  2751.        nw_to Different_Maze_5,
  2752.        sw_to Different_Maze_6,
  2753.        ne_to Different_Maze_7,
  2754.        u_to Different_Maze_8,
  2755.        d_to Different_Maze_9,
  2756.        n_to Different_Maze_10,
  2757.        s_to Different_Maze_11,
  2758.        e_to Different_Maze_2;
  2759.  
  2760. Object Different_Maze_4 "Maze"
  2761.  class DiffMaze
  2762.   with
  2763.        nw_to Different_Maze_1,
  2764.        u_to Different_Maze_3,
  2765.        n_to Different_Maze_5,
  2766.        s_to Different_Maze_6,
  2767.        w_to Different_Maze_7,
  2768.        sw_to Different_Maze_8,
  2769.        ne_to Different_Maze_9,
  2770.        e_to Different_Maze_10,
  2771.        d_to Different_Maze_11,
  2772.        se_to Different_Maze_2;
  2773.  
  2774. Object Different_Maze_5 "Maze"
  2775.  class DiffMaze
  2776.   with
  2777.        u_to Different_Maze_1,
  2778.        d_to Different_Maze_3,
  2779.        w_to Different_Maze_4,
  2780.        ne_to Different_Maze_6,
  2781.        sw_to Different_Maze_7,
  2782.        e_to Different_Maze_8,
  2783.        n_to Different_Maze_9,
  2784.        nw_to Different_Maze_10,
  2785.        se_to Different_Maze_11,
  2786.        s_to Different_Maze_2;
  2787.  
  2788. Object Different_Maze_6 "Maze"
  2789.  class DiffMaze
  2790.   with
  2791.        ne_to Different_Maze_1,
  2792.        n_to Different_Maze_3,
  2793.        nw_to Different_Maze_4,
  2794.        se_to Different_Maze_5,
  2795.        e_to Different_Maze_7,
  2796.        d_to Different_Maze_8,
  2797.        s_to Different_Maze_9,
  2798.        u_to Different_Maze_10,
  2799.        w_to Different_Maze_11,
  2800.        sw_to Different_Maze_2;
  2801.  
  2802. Object Different_Maze_7 "Maze"
  2803.  class DiffMaze
  2804.   with
  2805.        n_to Different_Maze_1,
  2806.        se_to Different_Maze_3,
  2807.        d_to Different_Maze_4,
  2808.        s_to Different_Maze_5,
  2809.        e_to Different_Maze_6,
  2810.        w_to Different_Maze_8,
  2811.        sw_to Different_Maze_9,
  2812.        ne_to Different_Maze_10,
  2813.        nw_to Different_Maze_11,
  2814.        u_to Different_Maze_2;
  2815.  
  2816. Object Different_Maze_8 "Maze"
  2817.  class DiffMaze
  2818.   with
  2819.        e_to Different_Maze_1,
  2820.        w_to Different_Maze_3,
  2821.        u_to Different_Maze_4,
  2822.        sw_to Different_Maze_5,
  2823.        d_to Different_Maze_6,
  2824.        s_to Different_Maze_7,
  2825.        nw_to Different_Maze_9,
  2826.        se_to Different_Maze_10,
  2827.        ne_to Different_Maze_11,
  2828.        n_to Different_Maze_2;
  2829.  
  2830. Object Different_Maze_9 "Maze"
  2831.  class DiffMaze
  2832.   with
  2833.        se_to Different_Maze_1,
  2834.        ne_to Different_Maze_3,
  2835.        s_to Different_Maze_4,
  2836.        d_to Different_Maze_5,
  2837.        u_to Different_Maze_6,
  2838.        nw_to Different_Maze_7,
  2839.        n_to Different_Maze_8,
  2840.        sw_to Different_Maze_10,
  2841.        e_to Different_Maze_11,
  2842.        w_to Different_Maze_2;
  2843.  
  2844.  
  2845. Object Different_Maze_10 "Maze"
  2846.  class DiffMaze
  2847.   with
  2848.        d_to Different_Maze_1,
  2849.        e_to Different_Maze_3,
  2850.        ne_to Different_Maze_4,
  2851.        u_to Different_Maze_5,
  2852.        w_to Different_Maze_6,
  2853.        n_to Different_Maze_7,
  2854.        s_to Different_Maze_8,
  2855.        se_to Different_Maze_9,
  2856.        sw_to Different_Maze_11,
  2857.        nw_to Different_Maze_2;
  2858.  
  2859. Object Different_Maze_11 "Maze"
  2860.  class DiffMaze
  2861.   with
  2862.        sw_to Different_Maze_1,
  2863.        nw_to Different_Maze_3,
  2864.        e_to Different_Maze_4,
  2865.        w_to Different_Maze_5,
  2866.        n_to Different_Maze_6,
  2867.        d_to Different_Maze_7,
  2868.        se_to Different_Maze_8,
  2869.        u_to Different_Maze_9,
  2870.        s_to Different_Maze_10,
  2871.        ne_to Different_Maze_2;
  2872.  
  2873.  
  2874. Object Dead_End_14 "Dead End, near Vending Machine"
  2875.  class DeadEndRoom
  2876.   with description
  2877.                "You have reached a dead end. There is a massive \
  2878.                vending machine here.",
  2879.        n_to Different_Maze_2,
  2880.        out_to Different_Maze_2
  2881.   has  nodwarf;
  2882.  
  2883. Nearby PirateMessage "message in the dust"
  2884.   with description
  2885.                "The message reads, ~This is not the maze where the \
  2886.                pirate leaves his treasure chest.~",
  2887.        name "message" "scrawl" "writing" "script" "scrawled" "flowery",
  2888.        initial "Hmmm...  There is a message here \
  2889.                 scrawled in the dust in a flowery script."
  2890.   has  scenery;
  2891.  
  2892.  
  2893. Nearby VendingMachine "vending machine"
  2894.   with description
  2895.                "The instructions on the vending machine read, \
  2896.                ~Insert coins to receive fresh batteries.~",
  2897.        name "machine" "slot" "vending" "massive" "battery" "coin",
  2898.        before
  2899.        [; Receive:
  2900.              if (noun==rare_coins)
  2901.              {   move fresh_batteries to location;
  2902.                  remove rare_coins;
  2903.                  "Soon after you insert the coins in the coin \
  2904.                   slot, the vending machines makes a grinding \
  2905.                   sound, and a set of fresh batteries falls at your feet.";
  2906.              }
  2907.              "The machine seems to be designed to take coins.";
  2908.           Attack:
  2909.              "The machine is quite sturdy and survives your attack \
  2910.               without getting so much as a scratch.";
  2911.           LookUnder:
  2912.                "You don't find anything under the machine.";
  2913.           Search:
  2914.                "You can't get inside the machine.";
  2915.           Take: "The vending machine is far too heavy to move.";
  2916.        ],
  2917.   has  scenery;
  2918.  
  2919. Object fresh_batteries "fresh batteries" VendingMachine
  2920.   with description "They look like ordinary batteries.  (A sepulchral \
  2921.                     voice says, ~Still going!~)",
  2922.        initial "There are fresh batteries here.",
  2923.        name "batteries" "battery" "fresh";
  2924.  
  2925. Object old_batteries "worn-out batteries"
  2926.   with description "They look like ordinary batteries.",
  2927.        initial "Some worn-out batteries have been discarded nearby.",
  2928.        name "batteries" "battery" "worn" "out" "worn-out";
  2929.  
  2930. ! ----------------------------------------------------------------------------
  2931. !   Dwarves!
  2932. ! ----------------------------------------------------------------------------
  2933.  
  2934. Object dwarf "threatening little dwarf"
  2935.   with name "dwarf" "threatening" "nasty" "little" "mean",
  2936.        description "It's probably not a good idea to get too close.  Suffice \
  2937.                     it to say the little guy's pretty aggressive.",
  2938.        initial "A threatening little dwarf hides in the shadows.",
  2939.        number 5,
  2940.        time_left 0,
  2941.        daemon
  2942.        [; if (location==thedark) rtrue;
  2943.           if (self.number==0) { StopDaemon(self); rtrue; }
  2944.           if (parent(dwarf)==0)
  2945.           {   if (location has nodwarf || location has light) rtrue;
  2946.               if (random(100)<=self.number)
  2947.               {   if (Bear in location || Troll in location) rtrue;
  2948.                   new_line;
  2949.                   if (Dragon in location)
  2950.                   {   self.number=self.number-1;
  2951.                       "A dwarf appears, but with one casual blast the dragon \
  2952.                        vapourises him!";
  2953.                   }
  2954.                   move dwarf to location;
  2955.                   "A threatening little dwarf comes out of the shadows!";
  2956.               }
  2957.               rtrue;
  2958.           }
  2959.           if (parent(dwarf)~=location)
  2960.           {   if (location==thedark) rtrue;
  2961.               if (location has nodwarf || location has light) rtrue;
  2962.               if (random(100)<=96 && parent(dwarf)~=In_Mirror_Canyon)
  2963.               {   move dwarf to location;
  2964.                   print "^The dwarf stalks after you...^";
  2965.               }
  2966.               else { remove dwarf; rtrue; }
  2967.           }
  2968.           if (random(100)<=75)
  2969.           {   new_line;
  2970.               if (self hasnt general)
  2971.               {   move axe to location; give self general; remove self;
  2972.                   "The dwarf throws a nasty little axe at you, misses, \
  2973.                   curses, and runs away.";
  2974.               }
  2975.               if (location==In_Mirror_Canyon)
  2976.                   "The dwarf admires himself in the mirror.";
  2977.               print "The dwarf throws a nasty little knife at you, ";
  2978.               if (random(1000)<=95) { deadflag=1; "and hits!"; }
  2979.               "but misses!";
  2980.           }
  2981.           if (random(3)==1)
  2982.           { remove dwarf; "^Tiring of this, the dwarf slips away."; }
  2983.        ],
  2984.        before
  2985.        [; Kick: "You boot the dwarf across the room.  He curses, then \
  2986.                  gets up and brushes himself off.  Now he's madder \
  2987.                  than ever!";
  2988.        ],
  2989.        life
  2990.        [; ThrowAt:
  2991.            if (noun==axe)
  2992.            {   if (random(3)~=1)
  2993.                {   remove self; move axe to location;
  2994.                    self.number=self.number-1;
  2995.                    "You killed a little dwarf!  The body vanishes in a cloud \
  2996.                     of greasy black smoke.";
  2997.                }
  2998.                move axe to location;
  2999.                "Missed!  The little dwarf dodges out of the way of the axe.";
  3000.            }
  3001.            <<Give noun second>>;
  3002.           Give:
  3003.            if (noun==tasty_food) "You fool, dwarves eat only coal!  \
  3004.                                   Now you've made him *really* mad!";
  3005.            "The dwarf is not at all interested in your \
  3006.             offer.  (The reason being, perhaps, that if \
  3007.             he kills you he gets everything you have \
  3008.             anyway.)";
  3009.           Attack: "Not with your bare hands.  No way.";
  3010.        ],
  3011.   has  animate;
  3012.  
  3013. Object axe "dwarvish axe"
  3014.   with name "axe" "little" "dwarvish" "dwarven",
  3015.        initial "There is a little axe here.",
  3016.        description "It's just a little axe.",
  3017.        before
  3018.        [; if (axe hasnt general) rfalse;
  3019.           Examine: "It's lying beside the bear.";
  3020.           Take:    "No chance.  It's lying beside the ferocious \
  3021.                     bear, quite within harm's way.";
  3022.        ];
  3023.  
  3024. ! ----------------------------------------------------------------------------
  3025. !   Piracy, twice over
  3026. ! ----------------------------------------------------------------------------
  3027.  
  3028. Object pirate "pirate"
  3029.   with time_left 0,
  3030.        daemon
  3031.        [ c i j;
  3032.           if (pirate has general && pirate has scored)
  3033.           {   StopDaemon(pirate); rtrue;
  3034.           }
  3035.           if (location==thedark || location has light || location has nodwarf
  3036.               || random(100)>2 || location==In_Secret_Canyon) rtrue;
  3037.  
  3038.           if (parent(dwarf)==location)
  3039.              "^A bearded pirate appears, catches sight of the dwarf and runs \
  3040.               away.";
  3041.  
  3042.           objectloop (i in player)   if (i has valuable) c++;
  3043.           objectloop (i in location) if (i has valuable) c++;
  3044.           if (c==0)
  3045.           {   if (pirate has general) rfalse;
  3046.               give pirate general;
  3047.               "^There are faint rustling noises \
  3048.                from the darkness behind you.  As you \
  3049.                turn toward them, you spot \
  3050.                a bearded pirate. He is carrying a \
  3051.                large chest.^^~Shiver me timbers!~ \ 
  3052.                he cries, ~I've been spotted!  I'd \
  3053.                best hie meself off to the maze to \
  3054.                hide me chest!~^^With that, he \
  3055.                vanishes into the gloom.";
  3056.           }
  3057.           if (pirate has scored) rfalse; give pirate scored;
  3058.           while (c>0)
  3059.           {   objectloop (i in player)
  3060.                   if (i has valuable) { j=i; score=score-5; }
  3061.               objectloop (i in location) if (i has valuable) j=i;
  3062.               move j to Dead_End_13; c--;
  3063.           }
  3064.           "^Out from the shadows behind you \
  3065.            pounces a bearded pirate!  ~Har, \
  3066.            har,~ he chortles.  ~I'll just take \
  3067.            all this booty and hide it away with \
  3068.            me chest deep in the maze!~  He \
  3069.            snatches your treasure and vanishes \
  3070.            into the gloom.";
  3071.        ];
  3072.  
  3073. ! ----------------------------------------------------------------------------
  3074. !   The cave is closing now...
  3075. ! ----------------------------------------------------------------------------
  3076.  
  3077. Object cave_closer "cave closer"
  3078.   with time_left 0,
  3079.        daemon
  3080.        [; if (treasures_found < MAX_TREASURES) rtrue;
  3081.           StopDaemon(self);
  3082.           caves_closed=1;
  3083.  
  3084.           score=score + 25;
  3085.  
  3086.           remove CrystalBridge;
  3087.           give Grate locked ~open; remove set_of_keys;
  3088.  
  3089.           StopDaemon(dwarf); StopDaemon(pirate);
  3090.           remove Troll; remove Bear; remove Dragon;
  3091.  
  3092.           StartTimer(endgame_timer, 25);
  3093.  
  3094.           "^A sepulchral voice reverberating through the cave says, \
  3095.            ~Cave closing soon.  All adventurers exit immediately \
  3096.            through main office.~";
  3097.        ];
  3098.  
  3099. Object endgame_timer "endgame timer"
  3100.   with time_left 0,
  3101.        time_out
  3102.        [; score=score + 10;
  3103.  
  3104.           while (child(player)~=0) remove child(player);
  3105.  
  3106.           move bottle to At_Ne_End;
  3107.           if (child(bottle)~=0) remove child(bottle);
  3108.  
  3109.           move giant_bivalve to At_Ne_End;
  3110.           move brass_lantern to At_Ne_End;
  3111.           move black_rod to At_Ne_End;
  3112.           move little_bird to At_Sw_End;
  3113.           move velvet_pillow to At_Sw_End;
  3114.  
  3115.          print "^The sepulchral voice intones, ~The cave is now \
  3116.           closed.~ As the echoes fade, there is a blinding flash of \
  3117.           light (and a small puff of orange smoke). . .^^\
  3118.           As your eyes refocus, you look around...^";
  3119.           PlayerTo(At_Ne_End);
  3120.        ];
  3121.  
  3122. ! ----------------------------------------------------------------------------
  3123. !   The End Game
  3124. ! ----------------------------------------------------------------------------
  3125.  
  3126. Object At_Ne_End "NE End of Repository"
  3127.   with description "You are at the northeast end of an immense \
  3128.                room, even larger than the giant room.  It appears to \
  3129.                be a repository for the ~Adventure~ program.  \
  3130.                Massive torches far overhead bathe the room with \
  3131.                smoky yellow light.  Scattered about you can be seen \
  3132.                a pile of bottles (all of them empty), a nursery of \
  3133.                young beanstalks murmuring quietly, a bed of oysters, \
  3134.                a bundle of black rods with rusty stars on their \
  3135.                ends, and a collection of brass lanterns.  Off to one \
  3136.                side a great many dwarves are sleeping on the floor, \
  3137.                snoring loudly.  A sign nearby reads: ~Do not \
  3138.                disturb the dwarves!~",
  3139.        sw_to At_Sw_End
  3140.   has  light;
  3141.  
  3142.  
  3143. Nearby Mirror_2 "enormous mirror"
  3144.   with description "It looks like an ordinary, albeit enormous, mirror.",
  3145.        name "mirror" "enormous" "huge" "big" "large" "suspended"
  3146.             "hanging" "vanity" "dwarvish",
  3147.        initial "An immense mirror is hanging against one wall, \
  3148.                and stretches to the other end of the room, where \
  3149.                various other sundry objects can be glimpsed dimly in \
  3150.                the distance.",
  3151.        found_in At_Ne_End At_Sw_End,
  3152.        before
  3153.        [;
  3154.           Attack:
  3155.              print "You strike the mirror a resounding blow, whereupon \
  3156.                     it shatters into a myriad tiny fragments.^^";
  3157.              DwarvesWake(); rtrue;
  3158.        ],
  3159.   has  static;
  3160.  
  3161.  
  3162. Nearby RepositoryStuff_1 "collection of adventure game materials"
  3163.   with description
  3164.                "You've seen everything in here already, albeit \
  3165.                in somewhat different contexts.",
  3166.        name "stuff" "junk" "materials" "torches" "objects"
  3167.        "adventure" "repository" "massive" "sundry",
  3168.        before
  3169.        [; Take: "Realizing that by removing the loot here you'd be \
  3170.                  ruining the game for future players, you leave the \
  3171.                  ~Adventure~ materials where they are.";
  3172.        ],
  3173.   has  scenery;
  3174.  
  3175.  
  3176. Nearby RepositoryDwarves "sleeping dwarves"
  3177.   with description "I wouldn't bother the dwarves if I were you.",
  3178.        name "dwarf" "dwarves" "sleeping" "snoring" "dozing" "snoozing",
  3179.        article "hundreds of angry",
  3180.        before
  3181.        [; 
  3182.           Take: "What, all of them?";
  3183.        ],
  3184.        life
  3185.        [; WakeOther:
  3186.               print "You prod the nearest dwarf, who wakes up grumpily, \
  3187.                      takes one look at you, curses, and grabs for his \
  3188.                      axe.^^";
  3189.               DwarvesWake(); rtrue;
  3190.           Attack: DwarvesWake(); rtrue;
  3191.        ],
  3192.   has  animate scenery;
  3193.  
  3194.  
  3195. Object At_Sw_End "SW End of Repository"
  3196.   with description
  3197.                "You are at the southwest end of the repository. \
  3198.                To one side is a pit full of fierce green snakes. On \
  3199.                the other side is a row of small wicker cages, each \
  3200.                of which contains a little sulking bird.  In one \
  3201.                corner is a bundle of black rods with rusty marks on \
  3202.                their ends.  A large number of velvet pillows are \
  3203.                scattered about on the floor. A vast mirror stretches \
  3204.                off to the northeast. At your feet is a large steel \
  3205.                grate, next to which is a sign which reads, \
  3206.                ~TREASURE VAULT. Keys in main office.~",
  3207.        d_to RepositoryGrate,
  3208.        ne_to At_Ne_End
  3209.   has  light;
  3210.  
  3211.  
  3212. Nearby RepositoryGrate "steel grate"
  3213.   with name "ordinary" "steel" "grate" "grating",
  3214.        description
  3215.                "It just looks like an ordinary steel grate.",
  3216.        when_open "The grate is open.",
  3217.        when_closed "The grate is closed.",
  3218.        door_dir d_to, door_to Outside_Grate, with_key 0
  3219.   has  static door locked openable;
  3220.  
  3221.  
  3222. Nearby RepositoryStuff_2 "collection of adventure game materials"
  3223.   with description
  3224.                "You've seen everything in here already, albeit \
  3225.                in somewhat different contexts.",
  3226.        name "pit" "snake" "snakes" "fierce" "green"
  3227.             "stuff" "junk" "materials"
  3228.             "adventure" "repository" "massive" "sundry",
  3229.        before
  3230.        [; Take: "Realizing that by removing the loot here you'd be \
  3231.                  ruining the game for future players, you leave the \
  3232.                  ~Adventure~ materials where they are.";
  3233.        ],
  3234.   has  scenery;
  3235.  
  3236. Nearby black_mark_rod "black rod with a rusty mark on the end"
  3237.   with description "It's a three foot black rod with a rusty mark on an end.",
  3238.        initial  "A three foot black rod \
  3239.                  with a rusty mark on one end lies nearby.",
  3240.        name "rod" "black" "rusty" "mark" "three" "foot" "iron" "explosive"
  3241.             "dynamite" "blast",
  3242.        before [; Wave: "Nothing happens."; ];
  3243.  
  3244. [ DwarvesWake;
  3245.   deadflag=1;
  3246.   "The resulting ruckus has awakened the dwarves.  There \
  3247.    are now dozens of threatening little dwarves in the room with \
  3248.    you!  Most of them throw knives at you!  All of them get \
  3249.    you!";
  3250. ];
  3251.  
  3252. ! ----------------------------------------------------------------------------
  3253. !   Some entry points
  3254. ! ----------------------------------------------------------------------------
  3255.  
  3256. [ Initialise;
  3257.   location=At_End_Of_Road; score = 36;
  3258.  
  3259. #ifdef NOMENU_VERSION;
  3260.   pretty_flag = 0;
  3261. #endif;
  3262.  
  3263.   StartDaemon(dwarf); StartDaemon(pirate); StartDaemon(cave_closer);
  3264.  
  3265.   print "^^^^^Welcome to Adventure!^^";
  3266. ];
  3267.  
  3268. [ PrintRank;
  3269.   print ", earning you the rank of ";
  3270.   if (score >= 348) "Grandmaster Adventurer!";
  3271.   if (score >= 330) "Master, first class.";
  3272.   if (score >= 300) "Master, second class.";
  3273.   if (score >= 200) "Junior Master.";
  3274.   if (score >= 130) "Seasoned Adventurer.";
  3275.   if (score >= 100) "Experienced Adventurer.";
  3276.   if (score >= 35) "Adventurer.";
  3277.   if (score >= 10) "Novice.";
  3278.   "Amateur.";
  3279. ];
  3280.  
  3281. Global dark_warning = 0;
  3282. [ DarkToDark;
  3283.   if (dark_warning==0)
  3284.   {   dark_warning=1; "It is now pitch dark.  \
  3285.                        If you proceed you will likely fall into a pit.";
  3286.   }
  3287.   if (random(4) == 1)
  3288.   {   deadflag=1;
  3289.       "You fell into a pit and broke every bone in your body!";
  3290.   }
  3291.   rfalse;
  3292. ];
  3293.  
  3294. ! ----------------------------------------------------------------------------
  3295. !   Menu-driven help
  3296. ! ----------------------------------------------------------------------------
  3297.  
  3298. [ HelpMenu;
  3299.   if (menu_item==0)  { item_width=8; item_name="About Adventure";
  3300.                        if (deadflag==2) return 4; else return 3;
  3301.                      }
  3302.   if (menu_item==1)  { item_width=6; item_name="Instructions"; }
  3303.   if (menu_item==2)  { item_width=4; item_name="History";      }
  3304.   if (menu_item==3)  { item_width=6; item_name="Authenticity"; }
  3305.   if (menu_item==4)  { item_width=7; item_name="Did you know..."; }
  3306. ];
  3307.  
  3308. [ HelpInfo;
  3309.  if (menu_item==1)
  3310.  {
  3311.  print "I know of places, actions, and things.  You can guide \
  3312.         me using commands that are complete sentences. To move, try \
  3313.         commands like ~enter,~ ~east,~ ~west,~ ~north,~ ~south,~ ~up,~ \
  3314.         ~down,~ ~enter building,~ ~climb pole,~ etc.^^";
  3315.  
  3316.  print "I know about a few special objects, like a black rod \
  3317.         hidden in the cave.  These objects can be manipulated using \
  3318.         some of the action words that I know.  Usually you will need \
  3319.         to give a verb followed by an object (along with descriptive \
  3320.         adjectives when desired), but sometimes I can infer the \
  3321.         object from the verb alone.  Some objects also imply verbs; \
  3322.         in particular, ~inventory~ implies ~take inventory~, \
  3323.         which causes me to give you a list of what you're carrying. \
  3324.         The objects have side effects; for instance, the rod scares \
  3325.         the bird.^^";
  3326.  
  3327.  print "Many commands have abbreviations.  For example, you can \
  3328.         type ~i~ in place of ~inventory,~ ~x object~ instead of \
  3329.         ~examine object,~ etc.^^";
  3330.  
  3331.  print "Usually people having trouble moving just need to try a \
  3332.         few more words.  Usually people trying unsuccessfully to \
  3333.         manipulate an object are attempting something beyond their \
  3334.         (or my!) capabilities and should try a completely different \
  3335.         tack.^^";
  3336.  
  3337.  print "Note that cave passages turn a lot, and that leaving a room \
  3338.         to the north does not guarantee \
  3339.         entering the next from the south.^^";
  3340.  
  3341.  print "If you want to end your adventure early, type ~quit~. \
  3342.         To suspend your adventure such that you can continue later, \
  3343.         type ~save,~ and to resume a saved game, type ~restore.~ \
  3344.         To see how well you're doing, type ~score~.  To get full \
  3345.         credit for a treasure, you must have left it safely in the \
  3346.         building, though you get partial credit just for locating it. \
  3347.         You lose points for getting killed, or for quitting, though \
  3348.         the former costs you more. There are also points based on how \
  3349.         much (if any) of the cave you've managed to explore; in \
  3350.         particular, there is a large bonus just for getting in (to \
  3351.         distinguish the beginners from the rest of the pack), and \
  3352.         there are other ways to determine whether you've been through \
  3353.         some of the more harrowing sections.^^";
  3354.  
  3355.  print "If you think you've found all the treasures, just keep \
  3356.         exploring for a while.  If nothing interesting happens, you \
  3357.         haven't found them all yet. If something interesting *does* \
  3358.         happen, it means you're getting a bonus and have an \
  3359.         opportunity to garner many more points in the master's \
  3360.         section.^^";
  3361.  
  3362.         "Good luck!";
  3363.  }
  3364.  if (menu_item==2)
  3365.  {
  3366.  print "This was the first adventure game ever written, based on a FORTRAN \
  3367.         simulation of the Mammoth and Flint Ridge cave system by Willie \
  3368.         Crowther.  Crowther was one of its explorers: some of the game's \
  3369.         locations are real, Bedquilt for instance.  (And ~Y2~ is a reference \
  3370.         to the cave-map notation for ~alternative entrance to caves~.)^^";
  3371.  
  3372.  print "Adventure (sometimes called ~Colossal Cave~, another real place) \
  3373.         was an extension largely by Don Woods, a colleague of Crowther's \
  3374.         at a Massachusetts computing firm.  Inspired by (a variant of) the \
  3375.         role-playing game ~Dungeons and Dragons~, they added puzzles and \
  3376.         magic to the caves.^^";
  3377.  
  3378.  print "The game was spread from machine to machine, and (among others) \
  3379.         DECUS, the Digital user group, issued tapes of it.  Ever since, \
  3380.         the game has been modified, ported, improved, extended and generally \
  3381.         corrupted.  The original is hard to find.  Most of the extras tacked \
  3382.         on are clearly inferior, and lose the spirit of the (certainly \
  3383.         imperfect, but atmospheric and well-designed) original.^^";
  3384.  
  3385.  print "This is a copy at third hand.  It is a slight simplification of David \
  3386.         M. Baggett's excellent 1993 version for Adventions, written in TADS: \
  3387.         which in turn derived from Donald Ekman's PC port of the original \
  3388.         FORTRAN source code.^^";
  3389.  
  3390.        "And, even by modern standards, it is still a good game!";
  3391.  }
  3392.  
  3393.  if (menu_item==3)
  3394.  {
  3395.  print "This port is fairly close to the original.  The puzzles, items and places \
  3396.         of the 1977 version are exactly those here.^^";
  3397.  
  3398.  print "I have added a few helpful messages, such as ~This is a dead end.~, \
  3399.         here and there: and restored some ~initial position~ messages from \
  3400.         objects, such as the (rather lame)^\
  3401.         ^  There is tasty food here.^^\
  3402.         from source files which are certainly early but of doubtful \
  3403.         provenance.  They seem to sit well with the rest of the text.^^";
  3404.  
  3405.  print "The scoring system is the original, except that you no longer lose 4 \
  3406.         points for quitting (since you don't get the score if you quit an \
  3407.         Inform game, this makes no difference) and, controversially, I award \
  3408.         5 points for currently carrying a treasure, as some early 1980s \
  3409.         ports did.  The rank names are tidied up a little.  The only \
  3410.         significant rule change is that one cannot use \
  3411.         magic words until their destinations have been visited.^^";
  3412.  
  3413.  print "The dwarves are simpler in their movements, but on the other hand I \
  3414.         have added a very few messages to make them interact better with the \
  3415.         rest of the game.  The probabilities are as in the original game.^^";
  3416.  
  3417.  print "In the original one could type the name of a room to visit it: for \
  3418.         the sake of keeping the code small, I have omitted this feature, but \
  3419.         with some regrets.^^";
  3420.  
  3421.  print "The text itself is almost everywhere preserved intact, but I've \
  3422.         corrected some spelling and grammatical mistakes (and altered a \
  3423.         couple of utterly misleading and gnomic remarks).  The instructions \
  3424.         have been slightly altered (for obvious reasons) but are basically \
  3425.         as written.^^";
  3426.  
  3427.        "A good source for details is David Baggett's source code, which is \
  3428.         circulated on the Internet.";
  3429.  }
  3430.  
  3431.  print "Did you know that...^^";
  3432.  
  3433.  print "The five dwarves have a 96% chance of following you, except into \
  3434.         light, down pits or when admiring themselves: and the nasty little \
  3435.         knives are 9.5% accurate.^^";
  3436.  
  3437.  print "Dragons burn up dwarves (perhaps because dwarves eat only coal).^^";
  3438.  
  3439.  print "The bear (who likes the volcano) is too heavy for the bridge... \
  3440.         and you can go back to the scene after being resurrected.^^";
  3441.  
  3442.  print "You can slip past the snake into the secret E/W canyon, \
  3443.         35% of the time at any rate.  And walking about in the dark \
  3444.         is not all that gruesome: it carries only a 25% risk of falling \
  3445.         down a pit.^^";
  3446.  
  3447.  print "The vase does not like being immersed.^^";
  3448.  
  3449.  print "Shadowy figures can wave to each other.^^";
  3450.  
  3451.  print "Watering the hinges of the door rusts them up again.^^";
  3452.  
  3453.  print "When the cave closes, the grate is locked and the keys are thrown \
  3454.         away, creatures run off and the crystal bridge vanishes...^^";
  3455.  
  3456.  print "...and a completely useless hint is written on the giant oyster's \
  3457.         shell in the end game.^^";
  3458.  
  3459.        "The last lousy point can be won by... but no.  That would be telling.";
  3460.  
  3461. ];
  3462.  
  3463. [ HelpSub;
  3464.  
  3465.  if (deadflag~=2)
  3466.  DoMenu("There is information provided on the following:^\
  3467.          ^     Instructions for playing\
  3468.          ^     The history of this game\
  3469.          ^     How authentic is this edition?^",
  3470.          #r$HelpMenu, #r$HelpInfo);
  3471.  else
  3472.  DoMenu("There is information provided on the following:^\
  3473.          ^     Instructions for playing\
  3474.          ^     The history of this game\
  3475.          ^     How authentic is this edition?\
  3476.          ^     Did you know...^",
  3477.          #r$HelpMenu, #r$HelpInfo);
  3478.  
  3479. ];
  3480.  
  3481. [ Amusing; HelpSub(); ];
  3482.  
  3483. ! ----------------------------------------------------------------------------
  3484. !   New verbs (to add to the library stock)
  3485. ! ----------------------------------------------------------------------------
  3486.  
  3487. [ CatchSub;
  3488.   print "You can't catch "; DefArt(noun); ".";
  3489. ];
  3490.  
  3491. [ ReleaseSub;
  3492.   print "You can't release "; DefArt(noun); ".";
  3493. ];
  3494.  
  3495. [ WaterSub;
  3496.   if (bottle in player) <<Empty bottle>>;
  3497.   "Water?  What water?";
  3498. ];
  3499.  
  3500. [ OilSub;
  3501.   if (bottle in player) <<Empty bottle>>;
  3502.   "Oil?  What oil?";
  3503. ];
  3504.  
  3505. [ OnSub; if (brass_lantern notin player) "You have no lamp.";
  3506.   <<SwitchOn brass_lantern>>;
  3507. ];
  3508.  
  3509. [ OffSub; if (brass_lantern notin player) "You have no lamp.";
  3510.   <<SwitchOff brass_lantern>>;
  3511. ];
  3512.  
  3513. [ XyzzySub; "Nothing happens."; ];
  3514. [ PlughSub; "Nothing happens."; ];
  3515. [ PloverSub; "Nothing happens."; ];
  3516. [ FeeSub; FthingSub(0); ];
  3517. [ FieSub; FthingSub(1); ];
  3518. [ FoeSub; FthingSub(2); ];
  3519. [ FooSub; FthingSub(3); ];
  3520.  
  3521. global fcount = 0;
  3522.  
  3523. [ FthingSub i;
  3524.   if (fcount~=i) { fcount=0; "Get it right, dummy!"; }
  3525.   fcount++;
  3526.   if (fcount==4)
  3527.   {   fcount=0;
  3528.       if (golden_eggs in In_Giant_Room) "Nothing happens.";
  3529.       if ((golden_eggs in player) || (golden_eggs in location))
  3530.           print "The nest of golden eggs has vanished!^";
  3531.       else print "Done!";
  3532.       if (golden_eggs in player) score=score-5;
  3533.       if (golden_eggs in Inside_Building)
  3534.           score=score-golden_eggs.depositpoints;
  3535.       move golden_eggs to In_Giant_Room;
  3536.       if (location==In_Giant_Room)
  3537.           "^^A large nest full of golden eggs suddenly appears out of nowhere!";
  3538.   }
  3539.   else "Ok.";
  3540. ];
  3541.  
  3542. [ CountSub; print_ret "I see one (1) ", object noun, "."; ];
  3543. [ UseSub; "You'll have to be a bit more explicit than that."; ];
  3544. [ BlastWithSub;
  3545.      if (second~=black_mark_rod)
  3546.          "Blasting requires dynamite.";
  3547.      "Been eating those funny brownies again?";
  3548. ];
  3549. [ OldMagicSub; "Good try, but that is an old worn-out magic word."; ];
  3550. [ KickSub; <<Attack noun>>; ]; ! For kicking dwarves
  3551.  
  3552. [ BlastSub;
  3553.   if (location~=At_Sw_End or At_Ne_End) "Frustrating, isn't it?";
  3554.   if (location==At_Sw_End && parent(black_mark_rod)==At_Ne_End)
  3555.   {   score=score+35;
  3556.       deadflag=2;
  3557.       "There is a loud explosion, and a twenty-foot \
  3558.        hole appears in the far wall, burying the dwarves in \
  3559.        the rubble.  You march through the hole and find \
  3560.        yourself in the main office, where a cheering band of \
  3561.        friendly elves carry the conquering adventurer off \
  3562.        into the sunset.";
  3563.   }
  3564.   if (location==At_Ne_End && parent(black_mark_rod)==At_Sw_End)
  3565.   {   score=score+20;
  3566.       deadflag=1;
  3567.       "There is a loud explosion, and a twenty-foot \
  3568.        hold appears in the far wall, burying the snakes in \
  3569.        the rubble.  A river of molten lava pours in through \
  3570.        the hole, destroying everything in its path, \
  3571.        including you!";
  3572.   }
  3573.   deadflag=1;
  3574.   "There is a loud explosion, and you are suddenly \
  3575.    splashed across the walls of the room.";
  3576. ];
  3577.  
  3578. ! ----------------------------------------------------------------------------
  3579. !   Resurrection
  3580. ! ----------------------------------------------------------------------------
  3581.  
  3582. [ AfterLife o;
  3583.   if (deadflag==3) { deadflag=1; rfalse; }
  3584.   print "^^";
  3585.   if (caves_closed==1) 
  3586.       "It looks as though you're dead.  Well, seeing as how \
  3587.        it's so close to closing time anyway, I think we'll \
  3588.        just call it a day.";
  3589.   if (deaths==0)
  3590.     print "Oh dear, you seem to have gotten yourself killed.  I \
  3591.        might be able to help you out, but I've never really \
  3592.        done this before.  Do you want me to try to \
  3593.        reincarnate you?^^";
  3594.   if (deaths==1)
  3595.     print "You clumsy oaf, you've done it again!  I don't know \
  3596.        how long I can keep this up.  Do you want me to try \
  3597.        reincarnating you again?^^";
  3598.   if (deaths==2)
  3599.     print "Now you've really done it!  I'm out of orange smoke! \
  3600.        You don't expect me to do a decent reincarnation \
  3601.        without any orange smoke, do you?^^";
  3602.  
  3603.   print "> ";
  3604.   if (YesOrNo()==0)
  3605.   {   if (deaths==0) "Very well.";
  3606.       if (deaths==1) "Probably a wise choice.";
  3607.       "I thought not!";
  3608.   }
  3609.  
  3610.   if (deaths==0)
  3611.       print "All right.  But don't blame me if something \
  3612.              goes wr......^^^^\
  3613.              --- POOF!! ---^^\
  3614.              You are engulfed in a cloud of orange smoke.  \
  3615.              Coughing and gasping, you emerge from the smoke and \
  3616.              find that you're....^";
  3617.   if (deaths==1)
  3618.       print "Okay, now where did I put my orange smoke?....  >POOF!<\
  3619.              ^^Everything disappears in a dense cloud of orange smoke.^";
  3620.   if (deaths==2)
  3621.       "Okay, if you're so smart, do it yourself!  I'm leaving!";
  3622.  
  3623.   deaths++; score=score-10;
  3624.   if (location~=thedark)
  3625.   {   while (child(player)~=0)
  3626.       {   o=child(player);
  3627.           move o to location;
  3628.           if (o has valuable) score=score-5;
  3629.       }
  3630.   }
  3631.   else
  3632.   {   while (child(player)~=0) move child(player) to real_location; }
  3633.   move brass_lantern to At_End_Of_Road; give brass_lantern ~on ~light;
  3634.   remove dwarf;
  3635.   deadflag=0;
  3636.   PlayerTo(Inside_Building);
  3637. ];
  3638.  
  3639. ! ----------------------------------------------------------------------------
  3640. !   How to cheat in the test version: no dwarves or pirates, and magic words
  3641. !   working from the beginning
  3642. ! ----------------------------------------------------------------------------
  3643.  
  3644. #IFDEF TEST_VERSION;
  3645. [ XdetermSub; StopDaemon(dwarf); StopDaemon(pirate);
  3646.   give In_Debris_Room visited; give At_Y2 visited; give In_Plover_Room visited;
  3647. ];
  3648. #ENDIF;
  3649.  
  3650. ! ----------------------------------------------------------------------------
  3651. !   Grammar: the usual grammar and some extensions
  3652. ! ----------------------------------------------------------------------------
  3653.  
  3654. Include "Grammar";
  3655.  
  3656. Verb "on"
  3657.                 *                                -> On;
  3658. Verb "off"
  3659.                 *                                -> Off;
  3660.  
  3661. Verb "catch" "capture"
  3662.                 * creature                       -> Catch
  3663.                 * creature "with" held           -> Catch;
  3664. Verb "release" "free"
  3665.                 * creature                       -> Release;
  3666. Verb "pour" "douse"
  3667.                 * noun                           -> Empty;
  3668. Verb "water"    * noun                           -> Water;
  3669. Verb "oil" "grease" "lubricate"
  3670.                 * noun                           -> Oil;
  3671. Verb "plugh"    *                                -> Plugh;
  3672. Verb "xyzzy"    *                                -> Xyzzy;
  3673. Verb "plover"   *                                -> Plover;
  3674. Verb "sesame" "shazam" "hocus" "abracadabra"
  3675.      "foobar" "open-sesame" "frotz"
  3676.                 *                                -> OldMagic;
  3677. Verb "fee"      *                                -> Fee;
  3678. Verb "fie"      *                                -> Fie;
  3679. Verb "foe"      *                                -> Foe;
  3680. Verb "foo"      *                                -> Foo;
  3681.  
  3682. Verb "help"     *                                -> Help;
  3683. Verb "kick"     * noun                           -> Kick;
  3684. Verb "count"    *                                -> Count;
  3685. Verb "use"      *                                -> Use;
  3686. Verb "blast"    *                                -> Blast
  3687.                 * noun "with" held               -> BlastWith;
  3688.  
  3689. #IFDEF TEST_VERSION;
  3690. Verb "xdeterm"  *                                -> Xdeterm;
  3691. #ENDIF;
  3692.  
  3693. end;
  3694.